PHP Class phpQueryObject, microweber

Inheritance: implements Iterator, implements Countable, implements ArrayAccess
Mostrar archivo Open project: microweber/microweber Class Usage Examples

Public Properties

Property Type Description
$charset
$document DOMDocument DOMDocument class.
$documentFragment boolean Every document is realy a full document, so even documentFragments can be queried against , but getDocument(id)->htmlOuter() will return only contents of .
$documentID
$documentWrapper DOMDocumentWrapper
$elements array Stack of selected elements.
$xpath DOMXPath XPath interface.

Protected Properties

Property Type Description
$current Iterator interface helper.
$elementsBackup
$elementsInterator Iterator interface helper.
$previous
$root
$valid Iterator interface helper.

Public Methods

Method Description
___wrapAllCallback ( $node ) : unknown_type
__call ( $method, $args ) : unknown_type
__construct ( $documentID ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
__destruct ( )
__get ( $attr ) : unknown_type
__loadSuccess ( $html ) : unknown_type
__toString ( )
_clone ( ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
_empty ( ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Proper name without underscore (just ->empty()) also works.
_next ( $selector = null ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Safe rename of next().
_prev ( $selector = null ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Use prev() and next().
add ( $selector = null ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
addClass ( $className ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
addClassPHP ( $className ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
after ( $content ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
afterPHP ( $content ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
ancestors ( $selector = null ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
andSelf ( ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
append ( $content ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
appendPHP ( $content ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
appendTo ( $seletor ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
attr ( $attr = null, $value = null )
attrPHP ( $attr, $code ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
before ( $content ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
beforePHP ( $content ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
bind ( unknown_type $type, unknown_type $data, unknown_type $callback = null ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Binds a handler to one or more events (like click) for each matched element.
callback ( $callback, $param1 = null, $param2 = null, $param3 = null ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Run callback on actual object.
change ( $callback = null ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
children ( $selector = null ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
click ( $callback = null ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
contents ( ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
contentsUnwrap ( ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
count ( )
css ( ) : phpQuery | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
current ( )
data ( $key, $value = null ) Enter description here.
documentFragment ( $state = null )
dump ( ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Dump htmlOuter and preserve chain. Usefull for debugging.
dumpDie ( ) Dump htmlOuter and stop script execution. Usefull for debugging.
dumpLength ( )
dumpTree ( $html = true, $title = true )
dumpWhois ( )
each ( array | string $callback, $param1 = null, $param2 = null, $param3 = null ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
end ( $level = 1 ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
eq ( $num ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
extend ( $class, $file = null ) : unknown_type Deprecated, use $pq->plugin() instead.
filter ( $selectors, $_skipHistory = false ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
filterCallback ( $callback, $_skipHistory = false ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
find ( $selectors, $context = null, $noHistory = false ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
get ( integer $index = null, $callback1 = null, $callback2 = null, $callback3 = null ) : array | DOMElement Return matched DOM nodes.
getDOMDocument ( ) : DOMDocument
getDocument ( ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Returns object with stack set to document root.
getDocumentID ( ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Get object's Document ID.
getDocumentIDRef ( &$documentID ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Saves object's DocumentID to $var by reference.
getString ( integer $index = null, $callback1 = null, $callback2 = null, $callback3 = null ) : array | string Return matched DOM nodes.
getStrings ( integer $index = null, $callback1 = null, $callback2 = null, $callback3 = null ) : array | string Return matched DOM nodes.
hasClass ( string $className ) : boolean Enter description here.
hide ( )
html ( unknown_type $html = null, $callback1 = null, $callback2 = null, $callback3 = null ) : string | phpQuery | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
htmlOuter ( $callback1 = null, $callback2 = null, $callback3 = null ) : string Enter description here.
index ( $subject ) : integer Enter description here.
insert ( unknown_type $target, unknown_type $type ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Internal insert method. Don't use it.
insertAfter ( $seletor ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
insertBefore ( $seletor ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
is ( $selector, $nodes = null ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
isHTML ( )
isXHTML ( )
isXML ( )
key ( )
length ( ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
load ( $url, $data = null, $callback = null ) : phpQuery | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
map ( $callback, $param1 = null, $param2 = null, $param3 = null ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
markup ( $markup = null, $callback1 = null, $callback2 = null, $callback3 = null ) : unknown_type jQuey difference.
markupOuter ( $callback1 = null, $callback2 = null, $callback3 = null ) : unknown_type jQuey difference.
markupOuterPHP ( ) : unknown_type Enter description here.
markupPHP ( $code = null ) : unknown_type Enter description here.
newInstance ( array $newStack = null ) Returns new instance of actual class.
next ( $cssSelector = null ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Double-function method.
nextAll ( $selector = null ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
not ( $selector = null ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
offsetExists ( $offset )
offsetGet ( $offset )
offsetSet ( $offset, $value )
offsetUnset ( $offset )
parent ( $selector = null ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
parents ( $selector = null ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
php ( $code = null ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Just like html(), but returns markup with VALID (dangerous) PHP tags.
plugin ( $class, $file = null ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
prepend ( $content ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
prependPHP ( $content ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
prependTo ( $seletor ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
prev ( $selector = null ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
prevAll ( $selector = null ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
remove ( $selector = null ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
removeAttr ( $attr ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
removeClass ( $className ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
removeData ( $key ) Enter description here.
replaceAll ( string $selector ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
replaceWith ( string | phpQuery $content ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
replaceWithPHP ( $code ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
reverse ( ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
rewind ( )
serialize ( ) : string Enter description here.
serializeArray ( $submit = null ) : array Enter description here.
show ( )
siblings ( $selector = null ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
size ( ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
slice ( unknown_type $start, unknown_type $end = null ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
stack ( $nodeTypes = null ) Internal stack iterator.
submit ( $callback = null ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
switchWith ( $markup ) Enter description here.
text ( $text = null, $callback1 = null, $callback2 = null, $callback3 = null ) : string Return joined text content.
toReference ( phpQueryObject &$var ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Saves actual object to $var by reference.
toRoot ( ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
toggleClass ( $className ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
trigger ( unknown_type $type, unknown_type $data = [] ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Trigger a type of event on every matched element.
triggerHandler ( unknown_type $type, unknown_type $data = [] ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery This particular method triggers all bound event handlers on an element (for a specific event type) WITHOUT executing the browsers default actions.
unbind ( unknown_type $type = null, unknown_type $callback = null ) : unknown Enter description here.
unloadDocument ( ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Unloads whole document from memory.
val ( $val = null ) : string Return form element value.
valid ( )
whois ( $oneNode = null ) HELPERS
wrap ( $wrapper ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
wrapAll ( $wrapper ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
wrapAllOld ( $wrapper ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
wrapAllPHP ( $codeBefore, $codeAfter ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
wrapInner ( $wrapper ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
wrapInnerPHP ( $codeBefore, $codeAfter ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
wrapPHP ( $codeBefore, $codeAfter ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery Enter description here.
xml ( $xml = null, $callback1 = null, $callback2 = null, $callback3 = null )
xmlOuter ( $callback1 = null, $callback2 = null, $callback3 = null )

Protected Methods

Method Description
__pseudoClassParam ( $paramsString )
attrEvents ( $attr, $oldAttr, $oldValue, $node ) TODO phpdoc; $oldAttr is result of hasAttribute, before any changes
debug ( $in )
elementsContainsNode ( $nodeToCheck, $elementsStack = null )
getElementSiblings ( $direction, $selector = null, $limitToOne = false )
getNodeAttrs ( $node )
getNodeXpath ( unknown_type $oneNode = null, $namespace = null ) : string Returns node's XPath.
isChar ( string $char ) : boolean Determines if $char is really a char.
isRegexp ( $pattern )
isRoot ( $node )
markupEvents ( $newMarkup, $oldMarkup, $node )
matchClasses ( unknown_type $class, unknown_type $node ) : boolean Enter description here.
merge ( )
parseSelector ( $query )
pseudoClasses ( $class )
runQuery ( $XQuery, $selector = null, $compare = null )
stackIsRoot ( )
unQuote ( $value ) : unknown_type

Private Methods

Method Description
__dumpTree ( $node, $intend )

Method Details

___wrapAllCallback() public method

public ___wrapAllCallback ( $node ) : unknown_type
$node
return unknown_type

__call() public method

public __call ( $method, $args ) : unknown_type
$method
$args
return unknown_type

__construct() public method

..
public __construct ( $documentID ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

__destruct() public method

public __destruct ( )

__get() public method

public __get ( $attr ) : unknown_type
$attr
return unknown_type

__loadSuccess() public method

public __loadSuccess ( $html ) : unknown_type
$html
return unknown_type

__pseudoClassParam() protected method

protected __pseudoClassParam ( $paramsString )

__toString() public method

public __toString ( )

_clone() public method

.. Normal use ->clone() .
public _clone ( ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

_empty() public method

Removes all child nodes from the set of matched elements. Example: pq("p")._empty() HTML:

Hello, Person and person

Result: [

]
public _empty ( ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

_next() public method

Use it ONLY when need to call next() on an iterated object (in same time). Normaly there is no need to do such thing ;)
public _next ( $selector = null ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

_prev() public method

Use prev() and next().
Deprecation:
public _prev ( $selector = null ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

add() public method

..
public add ( $selector = null ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

addClass() public method

..
public addClass ( $className ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

addClassPHP() public method

..
public addClassPHP ( $className ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

after() public method

..
public after ( $content ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

afterPHP() public method

..
public afterPHP ( $content ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

ancestors() public method

..
public ancestors ( $selector = null ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

andSelf() public method

..
public andSelf ( ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

append() public method

..
public append ( $content ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

appendPHP() public method

..
public appendPHP ( $content ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

appendTo() public method

..
public appendTo ( $seletor ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

attr() public method

public attr ( $attr = null, $value = null )

attrEvents() protected method

TODO phpdoc; $oldAttr is result of hasAttribute, before any changes
protected attrEvents ( $attr, $oldAttr, $oldValue, $node )

attrPHP() public method

..
public attrPHP ( $attr, $code ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

before() public method

..
public before ( $content ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

beforePHP() public method

..
public beforePHP ( $content ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

bind() public method

Can also bind custom events.
public bind ( unknown_type $type, unknown_type $data, unknown_type $callback = null ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
$type unknown_type
$data unknown_type Optional
$callback unknown_type
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

callback() public method

Run callback on actual object.
public callback ( $callback, $param1 = null, $param2 = null, $param3 = null ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

change() public method

..
public change ( $callback = null ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

children() public method

..
public children ( $selector = null ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

click() public method

..
public click ( $callback = null ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

contents() public method

..
public contents ( ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

contentsUnwrap() public method

.. jQuery difference.
public contentsUnwrap ( ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

count() public method

public count ( )

css() public method

..
public css ( ) : phpQuery | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQuery | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

current() public method

public current ( )

data() public method

..
public data ( $key, $value = null )
$key
$value

debug() protected method

protected debug ( $in )

documentFragment() public method

public documentFragment ( $state = null )

dump() public method

Dump htmlOuter and preserve chain. Usefull for debugging.
public dump ( ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

dumpDie() public method

Dump htmlOuter and stop script execution. Usefull for debugging.
public dumpDie ( )

dumpLength() public method

public dumpLength ( )

dumpTree() public method

public dumpTree ( $html = true, $title = true )

dumpWhois() public method

public dumpWhois ( )

each() public method

..
public each ( array | string $callback, $param1 = null, $param2 = null, $param3 = null ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
$callback array | string Expects $node as first param, $index as second
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

elementsContainsNode() protected method

protected elementsContainsNode ( $nodeToCheck, $elementsStack = null )

end() public method

..
public end ( $level = 1 ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

eq() public method

..
public eq ( $num ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

extend() public static method

Deprecated, use $pq->plugin() instead.
Deprecation:
public static extend ( $class, $file = null ) : unknown_type
$class
$file
return unknown_type

filter() public method

..
public filter ( $selectors, $_skipHistory = false ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

filterCallback() public method

.. jQuery difference. Callback: - $index int - $node DOMNode
public filterCallback ( $callback, $_skipHistory = false ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

find() public method

..
public find ( $selectors, $context = null, $noHistory = false ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

get() public method

Return matched DOM nodes.
public get ( integer $index = null, $callback1 = null, $callback2 = null, $callback3 = null ) : array | DOMElement
$index integer
return array | DOMElement Single DOMElement or array of DOMElement.

getDOMDocument() public method

public getDOMDocument ( ) : DOMDocument
return DOMDocument

getDocument() public method

Returns object with stack set to document root.
public getDocument ( ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

getDocumentID() public method

Get object's Document ID.
public getDocumentID ( ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

getDocumentIDRef() public method

$myDocumentId; phpQuery::newDocument('
') ->getDocumentIDRef($myDocumentId) ->find('div')->... .
See also: phpQuery::newDocument
See also: phpQuery::newDocumentFile
public getDocumentIDRef ( &$documentID ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

getElementSiblings() protected method

protected getElementSiblings ( $direction, $selector = null, $limitToOne = false )

getNodeAttrs() protected method

protected getNodeAttrs ( $node )

getNodeXpath() protected method

Returns node's XPath.
protected getNodeXpath ( unknown_type $oneNode = null, $namespace = null ) : string
$oneNode unknown_type
return string

getString() public method

jQuery difference.
public getString ( integer $index = null, $callback1 = null, $callback2 = null, $callback3 = null ) : array | string
$index integer
return array | string Returns string if $index != null

getStrings() public method

jQuery difference.
public getStrings ( integer $index = null, $callback1 = null, $callback2 = null, $callback3 = null ) : array | string
$index integer
return array | string Returns string if $index != null

hasClass() public method

..
public hasClass ( string $className ) : boolean
$className string
return boolean

hide() public method

public hide ( )

html() public method

..
public html ( unknown_type $html = null, $callback1 = null, $callback2 = null, $callback3 = null ) : string | phpQuery | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
$html unknown_type
return string | phpQuery | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

htmlOuter() public method

..
public htmlOuter ( $callback1 = null, $callback2 = null, $callback3 = null ) : string
return string

index() public method

..
public index ( $subject ) : integer
return integer

insert() public method

Internal insert method. Don't use it.
public insert ( unknown_type $target, unknown_type $type ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
$target unknown_type
$type unknown_type
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

insertAfter() public method

..
public insertAfter ( $seletor ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

insertBefore() public method

..
public insertBefore ( $seletor ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

is() public method

..
public is ( $selector, $nodes = null ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

isChar() protected method

Determines if $char is really a char.
protected isChar ( string $char ) : boolean
$char string
return boolean

isHTML() public method

public isHTML ( )

isRegexp() protected method

protected isRegexp ( $pattern )

isRoot() protected method

protected isRoot ( $node )

isXHTML() public method

public isXHTML ( )

isXML() public method

public isXML ( )

key() public method

public key ( )

length() public method

..
Deprecation: Use length as attribute
public length ( ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

load() public method

..
public load ( $url, $data = null, $callback = null ) : phpQuery | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQuery | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

map() public method

..
public map ( $callback, $param1 = null, $param2 = null, $param3 = null ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

markup() public method

jQuey difference.
public markup ( $markup = null, $callback1 = null, $callback2 = null, $callback3 = null ) : unknown_type
$markup
return unknown_type

markupEvents() protected method

protected markupEvents ( $newMarkup, $oldMarkup, $node )

markupOuter() public method

jQuey difference.
public markupOuter ( $callback1 = null, $callback2 = null, $callback3 = null ) : unknown_type
return unknown_type

markupOuterPHP() public method

..
public markupOuterPHP ( ) : unknown_type
return unknown_type

markupPHP() public method

..
public markupPHP ( $code = null ) : unknown_type
$code
return unknown_type

matchClasses() protected method

.. In the future, when PHP will support XLS 2.0, then we would do that this way: contains(tokenize(@class, '\s'), "something")
protected matchClasses ( unknown_type $class, unknown_type $node ) : boolean
$class unknown_type
$node unknown_type
return boolean

merge() protected method

protected merge ( )

newInstance() public method

Returns new instance of actual class.
public newInstance ( array $newStack = null )
$newStack array Optional. Will replace old stack with new and move old one to history.c

next() public method

First: main iterator interface method. Second: Returning next sibling, alias for _next(). Proper functionality is choosed automagicaly.
See also: phpQueryObject::_next()
public next ( $cssSelector = null ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

nextAll() public method

public nextAll ( $selector = null ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

not() public method

..
public not ( $selector = null ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

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 )

parent() public method

..
public parent ( $selector = null ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

parents() public method

..
public parents ( $selector = null ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

parseSelector() protected method

protected parseSelector ( $query )

php() public method

Just like html(), but returns markup with VALID (dangerous) PHP tags.
public php ( $code = null ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

plugin() public method

..
public plugin ( $class, $file = null ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

prepend() public method

..
public prepend ( $content ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

prependPHP() public method

..
public prependPHP ( $content ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

prependTo() public method

..
public prependTo ( $seletor ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

prev() public method

..
public prev ( $selector = null ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

prevAll() public method

public prevAll ( $selector = null ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

pseudoClasses() protected method

protected pseudoClasses ( $class )

remove() public method

..
public remove ( $selector = null ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

removeAttr() public method

..
public removeAttr ( $attr ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

removeClass() public method

..
public removeClass ( $className ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

removeData() public method

..
public removeData ( $key )
$key

replaceAll() public method

..
public replaceAll ( string $selector ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
$selector string
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

replaceWith() public method

..
public replaceWith ( string | phpQuery $content ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
$content string | phpQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

replaceWithPHP() public method

..
public replaceWithPHP ( $code ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

reverse() public method

..
public reverse ( ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

rewind() public method

public rewind ( )

runQuery() protected method

protected runQuery ( $XQuery, $selector = null, $compare = null )

serialize() public method

..
public serialize ( ) : string
return string

serializeArray() public method

..
public serializeArray ( $submit = null ) : array
return array

show() public method

public show ( )

siblings() public method

..
public siblings ( $selector = null ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

size() public method

..
public size ( ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

slice() public method

..
public slice ( unknown_type $start, unknown_type $end = null ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
$start unknown_type
$end unknown_type
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

stack() public method

Internal stack iterator.
public stack ( $nodeTypes = null )

stackIsRoot() protected method

protected stackIsRoot ( )

submit() public method

..
public submit ( $callback = null ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

switchWith() public method

.. jQuery difference.
public switchWith ( $markup )

text() public method

Return joined text content.
public text ( $text = null, $callback1 = null, $callback2 = null, $callback3 = null ) : string
return string

toReference() public method

Useful when need to break chain.
public toReference ( phpQueryObject &$var ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
$var phpQueryObject
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

toRoot() public method

.. NON JQUERY METHOD. Watch out, it doesn't creates new instance, can be reverted with end().
public toRoot ( ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

toggleClass() public method

..
public toggleClass ( $className ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

trigger() public method

Trigger a type of event on every matched element.
public trigger ( unknown_type $type, unknown_type $data = [] ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
$type unknown_type
$data unknown_type
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

triggerHandler() public method

This particular method triggers all bound event handlers on an element (for a specific event type) WITHOUT executing the browsers default actions.
public triggerHandler ( unknown_type $type, unknown_type $data = [] ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
$type unknown_type
$data unknown_type
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

unQuote() protected static method

protected static unQuote ( $value ) : unknown_type
$value
return unknown_type

unbind() public method

..
public unbind ( unknown_type $type = null, unknown_type $callback = null ) : unknown
$type unknown_type
$callback unknown_type
return unknown

unloadDocument() public method

CAUTION! None further operations will be possible on this document. All objects refering to it will be useless.
public unloadDocument ( ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

val() public method

Return form element value.
public val ( $val = null ) : string
return string Fields value.

valid() public method

public valid ( )

whois() public method

HELPERS
public whois ( $oneNode = null )

wrap() public method

..
public wrap ( $wrapper ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

wrapAll() public method

.. TODO testme...
public wrapAll ( $wrapper ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

wrapAllOld() public method

..
public wrapAllOld ( $wrapper ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

wrapAllPHP() public method

.. NON JQUERY METHOD.
public wrapAllPHP ( $codeBefore, $codeAfter ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

wrapInner() public method

..
public wrapInner ( $wrapper ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

wrapInnerPHP() public method

..
public wrapInnerPHP ( $codeBefore, $codeAfter ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

wrapPHP() public method

..
public wrapPHP ( $codeBefore, $codeAfter ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery

xml() public method

public xml ( $xml = null, $callback1 = null, $callback2 = null, $callback3 = null )

xmlOuter() public method

public xmlOuter ( $callback1 = null, $callback2 = null, $callback3 = null )

Property Details

$charset public_oe property

public $charset

$current protected_oe property

Iterator interface helper.
protected $current

$document public_oe property

DOMDocument class.
public DOMDocument $document
return DOMDocument

$documentFragment public_oe property

Every document is realy a full document, so even documentFragments can be queried against , but getDocument(id)->htmlOuter() will return only contents of .
public bool $documentFragment
return boolean

$documentID public_oe property

public $documentID

$documentWrapper public_oe property

public DOMDocumentWrapper $documentWrapper
return DOMDocumentWrapper

$elements public_oe property

Stack of selected elements.
public array $elements
return array

$elementsBackup protected_oe property

protected $elementsBackup

$elementsInterator protected_oe property

Iterator interface helper.
protected $elementsInterator

$previous protected_oe property

protected $previous

$root protected_oe property

protected $root

$valid protected_oe property

Iterator interface helper.
protected $valid

$xpath public_oe property

XPath interface.
public DOMXPath $xpath
return DOMXPath