PHP 인터페이스 pQuery\IQuery

상속: extends Countable
파일 보기 프로젝트 열기: tburry/pquery

공개 메소드들

메소드 설명
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.

메소드 상세

addClass() 공개 메소드

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.
리턴 pquery\IQuery

after() 공개 메소드

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.
리턴 pquery\IQuery

append() 공개 메소드

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.
리턴 pquery\IQuery

attr() 공개 메소드

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.
리턴 string | pquery\IQuery

before() 공개 메소드

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.
리턴 pquery\IQuery

clear() 공개 메소드

Remove all child nodes of the set of matched elements from the DOM.
public clear ( ) : IQuery;
리턴 IQuery;

hasClass() 공개 메소드

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() 공개 메소드

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() 공개 메소드

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() 공개 메소드

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() 공개 메소드

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() 공개 메소드

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() 공개 메소드

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() 공개 메소드

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() 공개 메소드

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

text() 공개 메소드

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() 공개 메소드

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() 공개 메소드

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

val() 공개 메소드

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() 공개 메소드

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

wrapInner() 공개 메소드

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