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

Class: Fragment

Source Location: /util/Fragment.php

Class Fragment

Class Overview

Implements interfaces:

Abstract Fragment class.

Located in /util/Fragment.php [line 68]



		
				Author(s):
		
  • Norman Markgraf (nmarkgraf(at)user.sourceforge.net)
API Tags:
Deprecated:  0.5.2 - 05. Mar. 2007 Use ODPElement instead of Fragment or ElementFragment!
Abstract:  

Information Tags:
Version:  Release: @package_version@
Copyright:  Copyright in 2006, 2007 by OpenDocumentPHP Team
Link:  http://opendocumentphp.org
Since:  0.5.0 - 08. Feb. 2007
License:  GNU General Public License 2.0.

Properties

Methods

[ Top ]
Direct descendents
Child Class Description
DublinCoreFragment DublinCoreFragment class.
MetaFragment MetaFragment class.

[ Top ]
Property Summary
mixed   $domFragment  
mixed   $root  
DOMXpath   $xpath  

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

[ Top ]
Properties
mixed   $domFragment [line 72]
API Tags:
Access:  protected


[ Top ]
mixed   $root [line 76]
API Tags:
Access:  protected


[ Top ]
DOMXpath   $xpath = null [line 81]
API Tags:
Access:  protected


[ Top ]
Methods
Constructor __construct  [line 88]

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

Constructor method.

Parameters:
DOMDocument   $domFragment:  Basic DOM document.
   $root: 

Information Tags:
Since:  0.5.0 - 08. Feb. 2007

Redefined in descendants as:

[ Top ]
appendChild  [line 274]

  void appendChild( $child  )

Set attribute with namespace.

Parameters:
   $child: 

API Tags:
Access:  public

Information Tags:
Since:  0.5.2 - 16. Mar. 2007

[ Top ]
createDCElement  [line 265]

  DOMElement createDCElement( $string $tag  )

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

Parameters:
$string   $tag:  Tag of the new DOMElement

API Tags:
Deprecated:  0.5.2 - 05. Mar. 2007 Use the AbstractDocument->create...Element() method instead!
Access:  protected

Information Tags:
Since:  0.5.0 - 08. Feb. 2007

[ Top ]
createMetaElement  [line 241]

  DOMElement createMetaElement( $string $tag  )

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

Parameters:
$string   $tag:  Tag of the new DOMElement

API Tags:
Deprecated:  0.5.2 - 05. Mar. 2007 Use the AbstractDocument->create...Element() method instead!
Access:  protected

Information Tags:
Since:  0.5.0 - 08. Feb. 2007

[ Top ]
createOfficeElement  [line 229]

  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="" />
.

Parameters:
string   $tag:  Tag of the new DOMElement

API Tags:
Deprecated:  0.5.2 - 05. Mar. 2007 Use the AbstractDocument->create...Element() method instead!
Access:  protected

Information Tags:
Since:  0.5.0 - 08. Feb. 2007

[ Top ]
createStyleElement  [line 253]

  DOMElement createStyleElement( $string $tag  )

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

Parameters:
$string   $tag:  Tag of the new DOMElement

API Tags:
Deprecated:  0.5.2 - 05. Mar. 2007 Use the AbstractDocument->create...Element() method instead!
Access:  protected

Information Tags:
Since:  0.5.0 - 08. Feb. 2007

[ Top ]
getChild  [line 176]

  bool getChild( $namespace, $tag  )

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

Parameters:
   $namespace: 
   $tag: 

API Tags:
Return:  True, if there is such an element else false.
Access:  public

Information Tags:
Since:  0.5.2 - 05. Mar. 2007

[ Top ]
getDocumentFragment  [line 103]

  DOMElement getDocumentFragment( )

Returns the root DOMElement of this DOM fragment.


API Tags:
Return:  Root node of this DOM fragment.
Access:  public

Information Tags:
Since:  0.5.0 - 08. Feb. 2007

Redefined in descendants as:

[ Top ]
getTag  [line 111]

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

Parameters:
   $query: 
   $namespace: 
   $tag: 
   $defaultValue: 

API Tags:
Access:  protected

Information Tags:
Since:  0.5.0 - 08. Feb. 2007

Redefined in descendants as:

[ Top ]
hasChild  [line 165]

  bool hasChild( $namespace, $tag  )

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

Parameters:
   $namespace: 
   $tag: 

API Tags:
Return:  True, if there is such an element else false.
Access:  public

Information Tags:
Since:  0.5.2 - 04. Mar. 2007

[ Top ]
initXpath  [line 195]

  void initXpath( )

Initialize xpath. You must do this before using xpath.


API Tags:
Access:  protected

Information Tags:
Since:  0.5.0 - 08. Feb. 2007

[ Top ]
setTag  [line 146]

  void setTag( DOMElement $node, DOMElement $newNode  )

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

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

API Tags:
Access:  protected

Information Tags:
Since:  0.5.0 - 08. Feb. 2007

[ Top ]

Documentation generated on Wed, 18 Jun 2008 06:28:48 +0200 by phpDocumentor 1.3.2