Zend Framework  3.0
Public Member Functions | Protected Attributes | List of all members
NodeList Class Reference

Nodelist for DOM XPath query. More...

Public Member Functions

 __construct ($cssQuery, $xpathQuery, DOMDocument $document, DOMNodeList $nodeList, DOMNode $contextNode=null)
 Constructor.
 
 getCssQuery ()
 Retrieve CSS Query.
 
 getXpathQuery ()
 Retrieve XPath query.
 
 getDocument ()
 Retrieve DOMDocument.
 
 getContextNode ()
 Retrieve context node.
 
 rewind ()
 Iterator: rewind to first element.
 
 valid ()
 Iterator: is current position valid?
 
 current ()
 Iterator: return current element.
 
 key ()
 Iterator: return key of current element.
 
 next ()
 Iterator: move to next element.
 
 count ()
 Countable: get count.
 
 offsetExists ($key)
 ArrayAccess: offset exists.
 
 offsetGet ($key)
 ArrayAccess: get offset.
 
 offsetSet ($key, $value)
 ArrayAccess: set offset.
 
 offsetUnset ($key)
 ArrayAccess: unset offset.
 

Protected Attributes

 $cssQuery
 
 $document
 
 $nodeList
 
 $position = 0
 
 $xpathQuery
 
 $contextNode
 

Detailed Description

Nodelist for DOM XPath query.

Deprecated:
See Also

Constructor & Destructor Documentation

__construct (   $cssQuery,
  $xpathQuery,
DOMDocument  $document,
DOMNodeList  $nodeList,
DOMNode  $contextNode = null 
)

Constructor.

Parameters
string$cssQuery
string | array$xpathQuery
DOMDocument$document
DOMNodeList$nodeList
DOMNode | null$contextNode

Member Function Documentation

count ( )

Countable: get count.

Returns
int
current ( )

Iterator: return current element.

Returns
DOMNode
getContextNode ( )

Retrieve context node.

Returns
DOMNode
getCssQuery ( )

Retrieve CSS Query.

Returns
string
getDocument ( )

Retrieve DOMDocument.

Returns
DOMDocument
getXpathQuery ( )

Retrieve XPath query.

Returns
string
key ( )

Iterator: return key of current element.

Returns
int
next ( )

Iterator: move to next element.

Returns
DOMNode
offsetExists (   $key)

ArrayAccess: offset exists.

Parameters
int$key
Returns
bool
offsetGet (   $key)

ArrayAccess: get offset.

Parameters
int$key
Returns
mixed
offsetSet (   $key,
  $value 
)

ArrayAccess: set offset.

Parameters
mixed$key
mixed$value
Exceptions
Exception\BadMethodCallExceptionwhen attempting to write to a read-only item
offsetUnset (   $key)

ArrayAccess: unset offset.

Parameters
mixed$key
Exceptions
Exception\BadMethodCallExceptionwhen attempting to unset a read-only item
rewind ( )

Iterator: rewind to first element.

Returns
DOMNode
valid ( )

Iterator: is current position valid?

Returns
bool

Member Data Documentation

$contextNode
protected
$cssQuery
protected
$document
protected
$nodeList
protected
$position = 0
protected
$xpathQuery
protected