PHP Class pQuery, pquery

Mostrar archivo Open project: tburry/pquery Class Usage Examples

Protected Properties

Property Type Description
$nodes pQuery\IQuery[]

Public Methods

Method Description
__construct ( $nodes = [] ) Methods ///
addClass ( $classname )
after ( $content )
append ( $content )
attr ( $name, $value = null )
before ( $content )
clear ( )
count ( ) : integer Get the count of matched elements.
getIterator ( ) }
hasClass ( $classname )
html ( $value = null )
offsetExists ( $offset )
offsetGet ( $offset )
offsetSet ( $offset, $value )
offsetUnset ( $offset )
parseFile ( string $path, resource $context = null ) : pQuery\DomNode Query a file or url.
parseStr ( string $html ) : pQuery\DomNode Query a string of html.
prepend ( $content = null )
prop ( $name, $value = null )
remove ( $selector = null )
removeAttr ( $name )
removeClass ( $classname )
replaceWith ( $content )
tagName ( $value = null )
text ( $value = null )
toggleClass ( $classname, $switch = null )
unwrap ( )
val ( $value = null )
wrap ( $wrapping_element )
wrapInner ( $wrapping_element )

Method Details

__construct() public method

Methods ///
public __construct ( $nodes = [] )

addClass() public method

public addClass ( $classname )

after() public method

public after ( $content )

append() public method

public append ( $content )

attr() public method

public attr ( $name, $value = null )

before() public method

public before ( $content )

clear() public method

public clear ( )

count() public method

Get the count of matched elements.
public count ( ) : integer
return integer Returns the count of matched elements.

getIterator() public method

}
public getIterator ( )

hasClass() public method

public hasClass ( $classname )

html() public method

public html ( $value = null )

offsetExists() public method

public offsetExists ( $offset )

offsetGet() public method

public offsetGet ( $offset )

offsetSet() public method

public offsetSet ( $offset, $value )

offsetUnset() public method

public offsetUnset ( $offset )

parseFile() public static method

Query a file or url.
public static parseFile ( string $path, resource $context = null ) : pQuery\DomNode
$path string The path to the url.
$context resource A context suitable to be passed into {@link file_get_contents}
return pQuery\DomNode Returns the root dom node for the html file.

parseStr() public static method

Query a string of html.
public static parseStr ( string $html ) : pQuery\DomNode
$html string
return pQuery\DomNode Returns the root dom node for the html string.

prepend() public method

public prepend ( $content = null )

prop() public method

public prop ( $name, $value = null )

remove() public method

public remove ( $selector = null )

removeAttr() public method

public removeAttr ( $name )

removeClass() public method

public removeClass ( $classname )

replaceWith() public method

public replaceWith ( $content )

tagName() public method

public tagName ( $value = null )

text() public method

public text ( $value = null )

toggleClass() public method

public toggleClass ( $classname, $switch = null )

unwrap() public method

public unwrap ( )

val() public method

public val ( $value = null )

wrap() public method

public wrap ( $wrapping_element )

wrapInner() public method

public wrapInner ( $wrapping_element )

Property Details

$nodes protected_oe property

protected IQuery[],pQuery $nodes
return pQuery\IQuery[]