PHP 클래스 FluentDOM\DocumentFragment

Be aware that a fragment is empty after it was appended.
상속: extends DOMDocumentFragment, implements Countable, implements IteratorAggregate, implements FluentDOM\Node\ParentNode, use trait FluentDOM\Node\ParentNode\Properties, use trait Node\QuerySelector\Implementation, use trait FluentDOM\Node\Xpath
파일 보기 프로젝트 열기: fluentdom/fluentdom

공개 메소드들

메소드 설명
__toString ( ) : string Casting the fragment to string will return the text content of all nodes
appendElement ( string $name, string $content = '', array $attributes = NULL ) : Element Append an child element
appendXml ( string $data, null | array | Traversable | DOMElement $namespaces = NULL ) : boolean Append an xml to the fragment, it can use namespace prefixes defined on the fragment object.
count ( ) : integer
getIterator ( ) : Iterator
namespaces ( null | array | Traversable | DOMElement $namespaces = NULL ) : array Get/Set the namespace definition used for the fragment strings.
registerNamespace ( $prefix, $namespace ) Register a namespace prefix to use it in appendXml()
saveXmlFragment ( ) : string Save as XML string

메소드 상세

__toString() 공개 메소드

Casting the fragment to string will return the text content of all nodes
public __toString ( ) : string
리턴 string

appendElement() 공개 메소드

Append an child element
public appendElement ( string $name, string $content = '', array $attributes = NULL ) : Element
$name string
$content string
$attributes array
리턴 Element

appendXml() 공개 메소드

Append an xml to the fragment, it can use namespace prefixes defined on the fragment object.
public appendXml ( string $data, null | array | Traversable | DOMElement $namespaces = NULL ) : boolean
$data string
$namespaces null | array | Traversable | DOMElement
리턴 boolean

count() 공개 메소드

public count ( ) : integer
리턴 integer

getIterator() 공개 메소드

public getIterator ( ) : Iterator
리턴 Iterator

namespaces() 공개 메소드

You can use an array(prefix => $namespace, ...) or an element node to set the namespaces. If the list is empty the document, the namespaces from the document object will be used.
public namespaces ( null | array | Traversable | DOMElement $namespaces = NULL ) : array
$namespaces null | array | Traversable | DOMElement
리턴 array

registerNamespace() 공개 메소드

Register a namespace prefix to use it in appendXml()
public registerNamespace ( $prefix, $namespace )
$prefix
$namespace

saveXmlFragment() 공개 메소드

Save as XML string
public saveXmlFragment ( ) : string
리턴 string