PHP Interface pQuery\IQuery

Inheritance: extends Countable
Afficher le fichier Open project: tburry/pquery

Méthodes publiques

Méthode Description
addClass ( string $classname ) : pquery\IQuery Adds the specified class(es) to each of the set of matched elements.
after ( string $content ) : pquery\IQuery Insert content, specified by the parameter, after each element in the set of matched elements.
append ( string $content ) : pquery\IQuery Insert content, specified by the parameter, to the end of each element in the set of matched elements.
attr ( string $name, null | string $value = null ) : string | pquery\IQuery Get the value of an attribute for the first element in the set of matched elements or set one or more attributes for every matched element.
before ( string $content ) : pquery\IQuery Insert content, specified by the parameter, before each element in the set of matched elements.
clear ( ) : IQuery; Remove all child nodes of the set of matched elements from the DOM.
hasClass ( string $classname ) Determine whether any of the matched elements are assigned the given class.
html ( string | null $value = null ) Get the HTML contents of the first element in the set of matched elements or set the HTML contents of every matched element.
prepend ( string $content ) Insert content, specified by the parameter, to the beginning of each element in the set of matched elements.
prop ( string $name, null | string $value = null ) Get the value of a property for the first element in the set of matched elements or set one or more properties for every matched element.
remove ( null | string $selector = null ) Remove the set of matched elements from the DOM.
removeAttr ( string $name ) Remove an attribute from each element in the set of matched elements.
removeClass ( string $classname ) Remove a single class, multiple classes, or all classes from each element in the set of matched elements.
replaceWith ( string $content ) Replace each element in the set of matched elements with the provided new content and return the set of elements that was removed.
tagName ( $value = null ) Returns the name of the element.
text ( null | string $value = null ) Get the combined text contents of each element in the set of matched elements, including their descendants, or set the text contents of the matched elements.
toggleClass ( string $classname, $switch = null ) Add or remove one or more classes from each element in the set of matched elements, depending on either the class’s presence or the value of the switch argument.
unwrap ( ) Remove the parents of the set of matched elements from the DOM, leaving the matched elements in their place.
val ( string | null $value = null ) Get the current value of the first element in the set of matched elements or set the value of every matched element.
wrap ( $wrapping_element ) Wrap an HTML structure around each element in the set of matched elements.
wrapInner ( $wrapping_element ) Wrap an HTML structure around the content of each element in the set of matched elements.

Method Details

addClass() public méthode

Adds the specified class(es) to each of the set of matched elements.
public addClass ( string $classname ) : pquery\IQuery
$classname string The name of the class to add. You can add multiple classes by separating them with spaces.
Résultat pquery\IQuery

after() public méthode

Insert content, specified by the parameter, after each element in the set of matched elements.
public after ( string $content ) : pquery\IQuery
$content string The content to add.
Résultat pquery\IQuery

append() public méthode

Insert content, specified by the parameter, to the end of each element in the set of matched elements.
public append ( string $content ) : pquery\IQuery
$content string The content to append.
Résultat pquery\IQuery

attr() public méthode

Get the value of an attribute for the first element in the set of matched elements or set one or more attributes for every matched element.
public attr ( string $name, null | string $value = null ) : string | pquery\IQuery
$name string The name of the attribute.
$value null | string The value to set or null to get the current attribute value.
Résultat string | pquery\IQuery

before() public méthode

Insert content, specified by the parameter, before each element in the set of matched elements.
public before ( string $content ) : pquery\IQuery
$content string The content to add.
Résultat pquery\IQuery

clear() public méthode

Remove all child nodes of the set of matched elements from the DOM.
public clear ( ) : IQuery;
Résultat IQuery;

hasClass() public méthode

Determine whether any of the matched elements are assigned the given class.
public hasClass ( string $classname )
$classname string The name of the class to check.

html() public méthode

Get the HTML contents of the first element in the set of matched elements or set the HTML contents of every matched element.
public html ( string | null $value = null )
$value string | null The value to set.

prepend() public méthode

Insert content, specified by the parameter, to the beginning of each element in the set of matched elements.
public prepend ( string $content )
$content string The content to add.

prop() public méthode

Get the value of a property for the first element in the set of matched elements or set one or more properties for every matched element.
public prop ( string $name, null | string $value = null )
$name string The name of the property. The currently supported properties are `tagname`, `selected`, and `checked`.
$value null | string The value to set or null to get the current property value.

remove() public méthode

Remove the set of matched elements from the DOM.
public remove ( null | string $selector = null )
$selector null | string A css query to filter the set of removed nodes.

removeAttr() public méthode

Remove an attribute from each element in the set of matched elements.
public removeAttr ( string $name )
$name string The name of the attribute to remove.

removeClass() public méthode

Remove a single class, multiple classes, or all classes from each element in the set of matched elements.
public removeClass ( string $classname )
$classname string The name of the class to remove.

replaceWith() public méthode

Replace each element in the set of matched elements with the provided new content and return the set of elements that was removed.
public replaceWith ( string $content )
$content string The content that will replace the nodes.

tagName() public méthode

Returns the name of the element.
public tagName ( $value = null )

text() public méthode

Get the combined text contents of each element in the set of matched elements, including their descendants, or set the text contents of the matched elements.
public text ( null | string $value = null )
$value null | string A string to set the text or null to return the current text.

toggleClass() public méthode

Add or remove one or more classes from each element in the set of matched elements, depending on either the class’s presence or the value of the switch argument.
public toggleClass ( string $classname, $switch = null )
$classname string

unwrap() public méthode

Remove the parents of the set of matched elements from the DOM, leaving the matched elements in their place.
public unwrap ( )

val() public méthode

Get the current value of the first element in the set of matched elements or set the value of every matched element.
public val ( string | null $value = null )
$value string | null The new value of the element or null to return the current value.

wrap() public méthode

Wrap an HTML structure around each element in the set of matched elements.
public wrap ( $wrapping_element )

wrapInner() public méthode

Wrap an HTML structure around the content of each element in the set of matched elements.
public wrapInner ( $wrapping_element )