Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Forward port #3040

  • Loading branch information...
commit 3bbd255134f1b99e6fe31ea34250c6b097b836e3 2 parents 98474d5 + 18fead6
@Maks3w authored
Showing with 6 additions and 15 deletions.
  1. +6 −15 library/Zend/Dom/NodeList.php
View
21 library/Zend/Dom/NodeList.php
@@ -14,7 +14,6 @@
use DOMDocument;
use DOMNodeList;
use DOMNode;
-use DOMXPath;
use Iterator;
/**
@@ -26,12 +25,6 @@
class NodeList implements Iterator, Countable
{
/**
- * Number of results
- * @var int
- */
- protected $count;
-
- /**
* CSS Selector query
* @var string
*/
@@ -54,11 +47,6 @@ class NodeList implements Iterator, Countable
protected $position = 0;
/**
- * @var DOMXPath
- */
- protected $xpath;
-
- /**
* XPath query
* @var string
*/
@@ -67,10 +55,10 @@ class NodeList implements Iterator, Countable
/**
* Constructor
*
- * @param string $cssQuery
+ * @param string $cssQuery
* @param string|array $xpathQuery
- * @param DOMDocument $document
- * @param DOMNodeList $nodeList
+ * @param DOMDocument $document
+ * @param DOMNodeList $nodeList
* @return void
*/
public function __construct($cssQuery, $xpathQuery, DOMDocument $document, DOMNodeList $nodeList)
@@ -119,6 +107,7 @@ public function getDocument()
public function rewind()
{
$this->position = 0;
+
return $this->nodeList->item(0);
}
@@ -132,6 +121,7 @@ public function valid()
if (in_array($this->position, range(0, $this->nodeList->length - 1)) && $this->nodeList->length > 0) {
return true;
}
+
return false;
}
@@ -163,6 +153,7 @@ public function key()
public function next()
{
++$this->position;
+
return $this->nodeList->item($this->position);
}
Please sign in to comment.
Something went wrong with that request. Please try again.