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

Class: Fragment

Source Location: /util/Fragment.php

Class Overview


Abstract Fragment class.


Author(s):

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

Version:

  • $Revision: 159 $

Copyright:

  • Copyright in 2006, 2007 by The OpenDocumentPHP Team

Variables

Constants

Methods


Child classes:

AutomaticStylesFragment
AutomaticStylesFragment class.
FontFaceDeclFragment
FontFaceDeclFragment class.
MasterStylesFragment
MasterStylesFragment class.
StylesFragment
SytlesFragment class.
DublinCoreFragment
DublinCoreFragment class.
MetaFragment
MetaFragment class.
Script
Script class.
TextFragment
TextFragment class.
TableFragment
TableFragment class.
BodyFragment
BodyFragment class.
ScriptsFragment
ScriptsFragment class.
ElementFragment
Abstract ElementFragment class.

Class Details

[line 38]
Abstract Fragment class.



Tags:

author:  Norman Markgraf (nmarkgraf(at)user.sourceforge.net)
version:  $Revision: 159 $
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 Variables

$domFragment =

[line 130]



Tags:

access:  protected

Type:   mixed


[ Top ]

$root =

[line 134]



Tags:

access:  protected

Type:   mixed


[ Top ]

$xpath =  null

[line 139]



Tags:

access:  protected

Type:   DOMXpath


[ Top ]



Class Methods


method appendChild [line 332]

void appendChild( $child)

Set attribute with namespace.



Tags:

since:  0.5.2 - 16.03.2007
access:  public


Parameters:

   $child  

[ Top ]

method createDCElement [line 323]

DOMElement createDCElement( $string $tag)

Create an DOMElement in the DC namespace with tag $tag.



Tags:

deprecated:  0.5.2 - 05.03.2007 Use the AbstractDocument->create...Element() method instead!
since:  0.5.0 - 08.02.2007
access:  protected


Parameters:

$string   $tag   Tag of the new DOMElement

[ Top ]

method createMetaElement [line 299]

DOMElement createMetaElement( $string $tag)

Create an DOMElement in the Meta namespace with tag $tag.



Tags:

deprecated:  0.5.2 - 05.03.2007 Use the AbstractDocument->create...Element() method instead!
since:  0.5.0 - 08.02.2007
access:  protected


Parameters:

$string   $tag   Tag of the new DOMElement

[ Top ]

method createOfficeElement [line 287]

DOMElement createOfficeElement( string $tag)

Create an DOMElement in the Office namespace with tag $tag.

Example:

  1.      $this->createOfficeElement('document');
will create an DOMElement like:
  1.      <office:document xmlns:office="" />
.




Tags:

deprecated:  0.5.2 - 05.03.2007 Use the AbstractDocument->create...Element() method instead!
since:  0.5.0 - 08.02.2007
access:  protected


Parameters:

string   $tag   Tag of the new DOMElement

[ Top ]

method createStyleElement [line 311]

DOMElement createStyleElement( $string $tag)

Create an DOMElement in the Meta namespace with tag $tag.



Tags:

deprecated:  0.5.2 - 05.03.2007 Use the AbstractDocument->create...Element() method instead!
since:  0.5.0 - 08.02.2007
access:  protected


Parameters:

$string   $tag   Tag of the new DOMElement

[ Top ]

method getChild [line 234]

bool getChild( $namespace, $tag)

Retrieve a child by its namespace and tag from the current node.



Tags:

return:  True, if there is such an element else false.
since:  0.5.2 - 05.03.2007
access:  public


Parameters:

   $namespace  
   $tag  

[ Top ]

method getDocumentFragment [line 161]

DOMElement getDocumentFragment( )

Returns the root DOMElement of this DOM fragment.



Tags:

return:  Root node of this DOM fragment.
since:  0.5.0 - 08.02.2007
access:  public


Overridden in child classes as:

MetaFragment::getDocumentFragment()
TableFragment::getDocumentFragment()
BodyFragment::getDocumentFragment()

[ Top ]

method getTag [line 169]

void getTag( $query, $namespace, $tag, $defaultValue)



Tags:

since:  0.5.0 - 08.02.2007
access:  protected


Overridden in child classes as:

DublinCoreFragment::getTag()
MetaFragment::getTag()

Parameters:

   $query  
   $namespace  
   $tag  
   $defaultValue  

[ Top ]

method hasChild [line 223]

bool hasChild( $namespace, $tag)

Check if the current element has a child $tag with $namespace.



Tags:

return:  True, if there is such an element else false.
since:  0.5.2 - 04.03.2007
access:  public


Parameters:

   $namespace  
   $tag  

[ Top ]

method initXpath [line 253]

void initXpath( )

Initialize xpath. You must do this before using xpath.



Tags:

since:  0.5.0 - 08.02.2007
access:  protected


[ Top ]

method setTag [line 204]

void setTag( DOMElement $node, DOMElement $newNode)

Set (which means append or replace an existing node) a new node.



Tags:

since:  0.5.0 - 08.02.2007
access:  protected


Parameters:

DOMElement   $node   Old node which should be replaced
DOMElement   $newNode   New node which should be appended or replace the $node node

[ Top ]

constructor __construct [line 146]

Fragment __construct( DOMDocument $domFragment, [ $root = NULL])

Constructor method.



Tags:

since:  0.5.0 - 08.02.2007


Overridden in child classes as:

AutomaticStylesFragment::__construct()
Constructor method.
FontFaceDeclFragment::__construct()
Constructor method.
MasterStylesFragment::__construct()
Constructor method.
StylesFragment::__construct()
Constructor method.
DublinCoreFragment::__construct()
Constructor method.
MetaFragment::__construct()
Constructor method.
Script::__construct()
Constructor method.
TextFragment::__construct()
Constructor method.
TableFragment::__construct()
Constructor method.
BodyFragment::__construct()
Constructor method.
ScriptsFragment::__construct()
Constructor method.
ElementFragment::__construct()
Constructor method.

Parameters:

DOMDocument   $domFragment   Basic DOM document.
   $root  

[ Top ]


Class Constants

ANIM =  'urn:oasis:names:tc:opendocument:xmlns:animation:1.0'

[line 94]

namespace OpenDocument animation


[ Top ]

CHART =  'urn:oasis:names:tc:opendocument:xmlns:chart:1.0'

[line 74]

namespace OpenDocument chart


[ Top ]

CONFIG =  'urn:oasis:names:tc:opendocument:xmlns:config:1.0'

[line 82]

namespace OpenDocument config


[ Top ]

DC =  'http://purl.org/dc/elements/1.1/'

[line 114]

namespace Dublin Core


[ Top ]

DR3D =  'urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0'

[line 90]

namespace OpenDocument dr3d


[ Top ]

DRAW =  'urn:oasis:names:tc:opendocument:xmlns:drawing:1.0'

[line 62]

namespace OpenDocument draw


[ Top ]

FO =  'urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0'

[line 106]

namespace OpenDocument fo (formation objects)


[ Top ]

FORM =  'urn:oasis:names:tc:opendocument:xmlns:form:1.0'

[line 78]

namespace OpenDocument form


[ Top ]

MANIFEST =  'urn:oasis:names:tc:opendocument:xmlns:manifest:1.0'

[line 50]

namespace OpenDocument manifest


[ Top ]

MATHML =  'http://www.w3.org/1998/Math/MathML'

[line 126]

namespace MathML


[ Top ]

META =  'urn:oasis:names:tc:opendocument:xmlns:meta:1.0'

[line 42]

namespace OpenDocument meta


[ Top ]

NUMBER =  'urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0'

[line 70]

namespace OpenDocument number


[ Top ]

OFFICE =  'urn:oasis:names:tc:opendocument:xmlns:office:1.0'

[line 46]

namespace OpenDocument office


[ Top ]

PRESENTATION =  'urn:oasis:names:tc:opendocument:xmlns:presentation:1.0'

[line 86]

namespace OpenDocument presentation


[ Top ]

SCRIPT =  'urn:oasis:names:tc:opendocument:xmlns:script:1.0'

[line 98]

namespace OpenDocument script


[ Top ]

SMIL =  'urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0'

[line 110]

namespace OpenDocument smil


[ Top ]

STYLE =  'urn:oasis:names:tc:opendocument:xmlns:style:1.0'

[line 54]

namespace OpenDocument style


[ Top ]

SVG =  'urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0'

[line 102]

namespace OpenDocument svg


[ Top ]

TABLE =  'urn:oasis:names:tc:opendocument:xmlns:table:1.0'

[line 66]

namespace OpenDocument table


[ Top ]

TEXT =  'urn:oasis:names:tc:opendocument:xmlns:text:1.0'

[line 58]

namespace OpenDocument text


[ Top ]

XFORMS =  'http://www.w3.org/2002/xforms'

[line 122]

namespace XForms


[ Top ]

XLINK =  'http://www.w3.org/1999/xlink'

[line 118]

namespace XLink


[ Top ]



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