PHP Класс FluentDOM\Nodes\Builder

Показать файл Открыть проект

Открытые методы

Метод Описание
__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.

Приватные методы

Метод Описание
getContentAsString ( string $content ) : string
getLimitedArray ( array | Traversable $nodes, integer $limit ) : array
getNodeList ( mixed $content, boolean $includeTextNodes = TRUE, integer $limit ) : array | Traversable

Описание методов

__construct() публичный Метод

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

getContentElement() публичный Метод

Convert $content to a DOMElement. If $content contains several elements use the first.
public getContentElement ( mixed $content ) : DOMElement
$content mixed
Результат DOMElement

getContentNodes() публичный Метод

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
Результат array

getFragment() публичный Метод

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
Результат array

getInnerXml() публичный Метод

Get the inner xml of a given node or in other words the xml of all children.
public getInnerXml ( DOMNode $context ) : string
$context DOMNode
Результат string

getOwner() публичный Метод

public getOwner ( ) : Nodes
Результат FluentDOM\Nodes

getTargetNodes() публичный Метод

Match selector against context and return matched elements.
public getTargetNodes ( mixed $selector, DOMNode $context = NULL ) : array
$selector mixed
$context DOMNode optional, default value NULL
Результат array

getWrapperNodes() публичный Метод

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
Результат DOMElement[]