OpenDocumentPHP
[ class tree: OpenDocumentPHP ] [ index: OpenDocumentPHP ] [ all elements ]

Class: ElementFragment

Source Location: /util/ElementFragment.php

Class Overview

Fragment
   |
   --ElementFragment

Abstract ElementFragment class.


Author(s):

  • Norman Markgraf (nmarkgraf(at)user.sourceforge.net)

Version:

  • $Revision: 147 $

Copyright:

  • Copyright in 2006, 2007 by The OpenDocumentPHP Team

Methods


Child classes:

FontFace
FontFace class.
TableProperties
TableProperties class.
UserFieldDecl
UserFieldDecl class.
UserFieldDecls
UserFieldDecls class.
UserFieldGet
UserFieldGet class.
Paragraph
Paragraph class.

Inherited Constants

Inherited Variables

Inherited Methods

Class: Fragment

Fragment::__construct()
Constructor method.
Fragment::appendChild()
Set attribute with namespace.
Fragment::createDCElement()
Create an DOMElement in the DC namespace with tag $tag.
Fragment::createMetaElement()
Create an DOMElement in the Meta namespace with tag $tag.
Fragment::createOfficeElement()
Create an DOMElement in the Office namespace with tag $tag.
Fragment::createStyleElement()
Create an DOMElement in the Meta namespace with tag $tag.
Fragment::getChild()
Retrieve a child by its namespace and tag from the current node.
Fragment::getDocumentFragment()
Returns the root DOMElement of this DOM fragment.
Fragment::getTag()
Fragment::hasChild()
Check if the current element has a child $tag with $namespace.
Fragment::initXpath()
Initialize xpath. You must do this before using xpath.
Fragment::setTag()
Set (which means append or replace an existing node) a new node.

Class Details

[line 39]
Abstract ElementFragment class.



Tags:

author:  Norman Markgraf (nmarkgraf(at)user.sourceforge.net)
version:  $Revision: 147 $
copyright:  Copyright in 2006, 2007 by The OpenDocumentPHP Team
deprecated:  0.5.2 - 05.03.2007 Use ODPElement instead of Fragment or ElementFragment!
abstract:  
since:  0.5.0 - 08.02.2007
license:  GNU General Public License 2.0.


[ Top ]


Class Methods


constructor __construct [line 45]

ElementFragment __construct( $domFragment, [ $root = null])

Constructor method.



Tags:

since:  0.5.0 - 08.02.2007


Overrides Fragment::__construct() (Constructor method.)

Parameters:

   $domFragment  
   $root  

[ Top ]

method getAttributeNS [line 83]

mixed getAttributeNS( $namespace, $tag)

Retreive an attribute by namespace and tag.



Tags:

return:  The value of the retrieved attribute or false if there is no such attribute.
since:  0.5.0 - 08.02.2007
access:  public


Parameters:

   $namespace  
   $tag  

[ Top ]

method getElement [line 98]

DOMElement getElement( )

Retrieve the current Class as DOMElement.



Tags:

return:  The current class as DOMElement.
since:  0.5.0 - 08.02.2007
access:  public


[ Top ]

method setAttributeNS [line 68]

mixed setAttributeNS( $namespace, $tag, $value)

Set an attribute with namespace, tag and value.

If an attibute old exists, it will be removed first.




Tags:

return:  True if there was no old attibute, else the old attribute node.
since:  0.5.0 - 08.02.2007
access:  public


Parameters:

   $namespace  
   $tag  
   $value  

[ Top ]

method __setRoot [line 59]

void __setRoot( )

Set the $root attribute correctly.



Tags:

abstract:  
since:  0.5.0 - 08.02.2007
access:  protected


Overridden in child classes as:

FontFace::__setRoot()
Set the root element to 'style:font-face-decl'.
UserFieldDecl::__setRoot()
Set element root to "text:user-field-decl"
UserFieldDecls::__setRoot()
Set element root to "text:user-field-decl"
UserFieldGet::__setRoot()
Set element root to "text:user-field-decl"
Paragraph::__setRoot()
Set element to 'text:p'.
Heading::__setRoot()
Set element to 'text:h'.

[ Top ]


Documentation generated on Tue, 12 Jun 2007 09:59:44 +0200 by phpDocumentor 1.3.2