Method |
Description |
|
__construct ( mixed $source = NULL, null | string $contentType = 'text/xml' ) |
|
|
__get ( string $name ) : mixed |
Virtual properties, read property |
|
__isset ( string $name ) : boolean |
Virtual properties, validate existence |
|
__set ( string $name, mixed $value ) |
Block changing the readonly dynamic property |
|
__toString ( ) : string |
Return the output of the internal dom document |
|
__unset ( string $name ) |
Throws an exception if somebody tries to unset one
of the dynamic properties |
|
count ( ) : integer |
Countable interface |
|
each ( callable $function, callable | boolean | null $elementsFilter = NULL ) |
Execute a function within the context of every matched element. |
|
end ( ) : Nodes |
Return the parent FluentDOM\Nodes object. |
|
find ( mixed $selector, integer $options ) : Nodes |
Searches for descendant elements that match the specified expression. |
|
formatOutput ( string $contentType = NULL ) : Nodes |
Formats the current document, resets internal node array and other properties. |
|
getDocument ( ) : DOMDocument | Document |
Get the associated DOM, create one if here isn't one yet. |
|
getIterator ( ) : NodesIterator |
IteratorAggregate interface |
|
getLoadingOptions ( null | string $contentType = NULL ) : array | mixed |
Return the options from the original loading action, but only if the
content type equals the loaded content type. |
|
getSelectorCallback ( null | callable | string | array | DOMNode | Traversable $selector ) : callable | null |
Returns a callback that can be used to validate if an node
matches the selector. |
|
index ( null | string | DOMNode | Traversable $selector = NULL ) : integer |
Search for a given element from among the matched elements. |
|
item ( integer $position ) : DOMElement | DOMNode |
The item() method is used to access elements in the node list,
like in a DOMNodeList. |
|
load ( mixed $source, string $contentType = 'text/xml', array | Traversable | Options $options = [] ) |
Load a $source. The type of the source depends on the loaders. If no explicit loaders are set
it will use a set of default loaders for xml/html and json. |
|
loaders ( fluentdom\Loadable | array | Traversable $loaders = NULL ) : fluentdom\Loadable |
Set the loaders list. |
|
offsetExists ( integer $offset ) : boolean |
Check if index exists in internal array |
|
offsetGet ( integer $offset ) : DOMElement | DOMNode | null |
Get element from internal array |
|
offsetSet ( integer $offset, mixed $value ) |
If somebody tries to modify the internal array throw an exception. |
|
offsetUnset ( integer $offset ) |
If somebody tries to remove an element from the internal array throw an exception. |
|
prepareSelector ( string $selector, integer $contextMode ) : string |
Use callback to convert selector if it is set. |
|
push ( DOMNode | Traversable | array | null $elements, boolean $ignoreTextNodes = FALSE ) |
Push new element(s) an the internal element list |
|
registerNamespace ( string $prefix, string $namespace ) |
Register a namespace for selectors/expressions |
|
serializerFactories ( Group $factories = NULL ) : Group |
|
|
spawn ( array | Traversable | DOMNode | Nodes $elements = NULL ) : Nodes |
Create a new instance of the same class with $this as the parent. This is used for the chaining. |
|
toArray ( ) : DOMNode[] |
Retrieve the matched DOM nodes in an array. |
|
toString ( ) : string |
Return the output of the internal dom document |
|
unique ( array $array ) : array |
Sorts an array of DOM nodes based on document position, in place, with the duplicates removed. |
|
xpath ( string $expression = NULL, DOMNode $contextNode = NULL ) : Xpath | DOMNodeList | float | string |
|
|