Method |
Description |
|
__call ( string $name, array $arguments ) : Query |
declaring an empty() or clone() method will crash the parser so we use some magic |
|
__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 |
|
__unset ( string $name ) |
Throws an exception if somebody tries to unset one
of the dynamic properties |
|
add ( string $selector, array | Traversable $context = NULL ) : Query |
Adds more elements, matched by the given expression, to the set of matched elements. |
|
addBack ( ) : Query |
Add the previous selection to the current selection. |
|
addClass ( string | callable $class ) : Query |
Adds the specified class(es) to each of the set of matched elements. |
|
after ( string | array | DOMNode | DOMNodeList | Traversable | callable $content ) : Query |
Insert content after each of the matched elements. |
|
andSelf ( ) : Query |
Alias for addBack() |
|
append ( string | array | DOMNode | Traversable | callable $content ) : Query |
Append content to the inside of every matched element. |
|
appendTo ( string | array | DOMNode | DOMNodeList | Query $selector ) : Query |
Append all of the matched elements to another, specified, set of elements. |
|
attr ( string | array $attribute, variadic<[callable | string]> $arguments ) : Query | string |
Access a property on the first matched element or set the attribute(s) of all matched elements |
|
before ( string | array | DOMNode | Traversable | callable $content ) : Query |
Insert content before each of the matched elements. |
|
children ( string $selector = NULL ) : Query |
Get a set of elements containing of the unique immediate
child nodes including only elements (not text nodes) of each
of the matched set of elements. |
|
closest ( string $selector, array | Traversable $context = NULL ) : Query |
Get a set of elements containing the closest parent element that matches the specified
selector, the starting element included. |
|
contents ( ) : Query |
Get a set of elements containing all of the unique immediate
child nodes including elements and text nodes of each of the matched set of elements. |
|
css ( string | array $property, variadic<[string | object | callable]> $arguments ) : string | null | $this |
get or set CSS values in style attributes |
|
data ( string | array $name, $arguments ) : mixed |
Read a data attribute from the first node or set data attributes on all selected nodes. |
|
eq ( integer $position ) : Query |
Reduce the set of matched elements to a single element. |
|
filter ( string | callable $selector ) : Query |
Removes all elements from the set of matched elements that do not match
the specified expression(s). |
|
first ( ) : Query |
Get a set of elements containing only the first of the currently selected elements. |
|
get ( $position = NULL ) : array |
Retrieve the matched DOM elements in an array. A negative position will be counted from the end. |
|
has ( string | DOMNode $selector ) : Query |
Reduce the set of matched elements to those that have
a descendant that matches the selector or DOM element. |
|
hasAttr ( string $name ) : boolean |
Returns true if the specified attribute is present on at least one of
the set of matched elements. |
|
hasClass ( string $class ) : boolean |
Returns true if the specified class is present on at least one of the set of matched elements. |
|
hasData ( DOMElement $element = NULL ) : boolean |
Validate if the element has an data attributes attached. If it is called without an
actual $element parameter, it will check the first matched node. |
|
html ( string | callable | null $html = NULL ) : string | self |
Get html contents of the first matched element or set the
html contents of all selected element nodes. |
|
insertAfter ( string | array | DOMNode | Traversable $selector ) : Query |
Insert all of the matched elements after another, specified, set of elements. |
|
insertBefore ( string | array | DOMNode | Traversable $selector ) : Query |
Insert all of the matched elements before another, specified, set of elements. |
|
is ( string $selector ) : boolean |
Checks the current selection against an expression and returns true,
if at least one element of the selection fits the given expression. |
|
last ( ) : Query |
Get a set of elements containing only the last of the currently selected elements. |
|
map ( callable $function ) : array |
Translate a set of elements in the FluentDOM\Query object into
another set of values in an array (which may, or may not contain elements). |
|
next ( string $selector = NULL ) : Query |
Get a set of elements containing the unique next siblings of each of the
given set of elements. |
|
nextAll ( string $selector = NULL ) : Query |
Find all sibling elements after the current element. |
|
nextUntil ( string $selector = NULL, string $filter = NULL ) : Query |
Get all following siblings of each element up to but
not including the element matched by the selector. |
|
not ( string | callback $selector ) : Query |
Removes elements matching the specified expression from the set of matched elements. |
|
outerHtml ( string | callable | null $html = NULL ) : string | self |
Get the first matched node as HTML or replace each
matched nodes with the provided fragment. |
|
outerXml ( string | callable | null $xml = NULL ) : string | self |
Get the first matched node as XML or replace each
matched nodes with the provided fragment. |
|
parent ( ) : Query |
Get a set of elements containing the unique parents of the matched set of elements. |
|
parents ( string $selector = NULL ) : Query |
Get the ancestors of each element in the current set of matched elements,
optionally filtered by a selector. |
|
parentsUntil ( string $stopAt = NULL, string $filter = NULL ) : Query |
Get the ancestors of each element in the current set of matched elements,
up to but not including the element matched by the selector. |
|
prepend ( string | array | DOMNode | Traversable $content ) : Query |
Prepend content to the inside of every matched element. |
|
prependTo ( string | array | DOMNode | DOMNodeList | Query $selector ) : Query |
Prepend all of the matched elements to another, specified, set of elements. |
|
prev ( string $selector = NULL ) : Query |
Get a set of elements containing the unique previous siblings of each of the
matched set of elements. |
|
prevAll ( string $selector = NULL ) : Query |
Find all sibling elements in front of the current element. |
|
prevUntil ( string $selector = NULL, string $filter = NULL ) : Query |
Get all preceding siblings of each element up to but not including
the element matched by the selector. |
|
remove ( string $selector = NULL ) : Query |
Removes all matched elements from the DOM. |
|
removeAttr ( string | array $name ) : Query |
Remove an attribute from each of the matched elements. If $name is NULL or *,
all attributes will be deleted. |
|
removeClass ( string | callable $class = '' ) : Query |
Removes all or the specified class(es) from the set of matched elements. |
|
removeData ( string | array | null $name = NULL ) : Query |
Remove an data - attribute from each of the matched elements. If $name is NULL or *,
all data attributes will be deleted. |
|
replaceAll ( string | array | DOMNode | Traversable $selector ) : Query |
Replaces the elements matched by the specified selector with the matched elements. |
|
replaceWith ( string | array | DOMNode | Traversable | callable $content ) : Query |
Replaces all matched elements with the specified HTML or DOM elements. |
|
reverse ( ) : Query |
Reverse the order of the matched elements. |
|
siblings ( string $selector = NULL ) : Query |
Get a set of elements containing all of the unique siblings of each of the
matched set of elements. |
|
slice ( integer $start, integer $end = NULL ) : Query |
Selects a subset of the matched elements. |
|
text ( string | callable $text = NULL ) : string | Query |
Get the combined text contents of all matched elements or
set the text contents of all matched elements. |
|
toggleClass ( string | callable $class, null | boolean $switch = NULL ) : Query |
Adds the specified classes if the switch is TRUE,
removes the specified classes if the switch is FALSE,
toggles the specified classes if the switch is NULL. |
|
wrap ( string | array | DOMNode | Traversable | callable $content ) : Query |
Wrap each matched element with the specified content. |
|
wrapAll ( string | array | DOMNode | Traversable $content ) : Query |
Wrap al matched elements with the specified content |
|
wrapInner ( string | array | DOMNode | Traversable $content ) : Query |
Wrap the inner child contents of each matched element
(including text nodes) with an XML structure. |
|
xml ( string | callable | null $xml = NULL ) : string | self |
Get xml contents of the first matched element or set the
xml contents of all selected element nodes. |
|