PHP Class FluentDOM\Nodes\Builder

Datei anzeigen Open project: fluentdom/fluentdom

Public Methods

Method Description
__construct ( Nodes $nodes )
getContentElement ( mixed $content ) : DOMElement Convert $content to a DOMElement. If $content contains several elements use the first.
getContentNodes ( mixed $content, boolean $includeTextNodes = TRUE, integer $limit ) : array Convert a given content into and array of nodes
getFragment ( string $xml, string $contentType = 'text/xml', boolean $includeTextNodes = TRUE, integer $limit ) : array Convert a given content string into and array of nodes
getInnerXml ( DOMNode $context ) : string Get the inner xml of a given node or in other words the xml of all children.
getOwner ( ) : Nodes
getTargetNodes ( mixed $selector, DOMNode $context = NULL ) : array Match selector against context and return matched elements.
getWrapperNodes ( DOMElement $template, boolean &$simple ) : DOMElement[] Get the inner and outer wrapper nodes. Simple means that they are the same nodes.

Private Methods

Method Description
getContentAsString ( string $content ) : string
getLimitedArray ( array | Traversable $nodes, integer $limit ) : array
getNodeList ( mixed $content, boolean $includeTextNodes = TRUE, integer $limit ) : array | Traversable

Method Details

__construct() public method

public __construct ( Nodes $nodes )
$nodes FluentDOM\Nodes

getContentElement() public method

Convert $content to a DOMElement. If $content contains several elements use the first.
public getContentElement ( mixed $content ) : DOMElement
$content mixed
return DOMElement

getContentNodes() public method

Convert a given content into and array of nodes
public getContentNodes ( mixed $content, boolean $includeTextNodes = TRUE, integer $limit ) : array
$content mixed
$includeTextNodes boolean
$limit integer
return array

getFragment() public method

Convert a given content string into and array of nodes
public getFragment ( string $xml, string $contentType = 'text/xml', boolean $includeTextNodes = TRUE, integer $limit ) : array
$xml string
$contentType string
$includeTextNodes boolean
$limit integer
return array

getInnerXml() public method

Get the inner xml of a given node or in other words the xml of all children.
public getInnerXml ( DOMNode $context ) : string
$context DOMNode
return string

getOwner() public method

public getOwner ( ) : Nodes
return FluentDOM\Nodes

getTargetNodes() public method

Match selector against context and return matched elements.
public getTargetNodes ( mixed $selector, DOMNode $context = NULL ) : array
$selector mixed
$context DOMNode optional, default value NULL
return array

getWrapperNodes() public method

Get the inner and outer wrapper nodes. Simple means that they are the same nodes.
public getWrapperNodes ( DOMElement $template, boolean &$simple ) : DOMElement[]
$template DOMElement
$simple boolean
return DOMElement[]