You are here

public function QueryPathIterator::current in QueryPath 7.2

Same name and namespace in other branches
  1. 6 QueryPath/QueryPath.php \QueryPathIterator::current()
  2. 7.3 QueryPath/QueryPath.php \QueryPathIterator::current()

File

QueryPath/QueryPath.php, line 2172

Class

QueryPathIterator

Code

public function current() {
  if (!isset($this->qp)) {
    $this->qp = qp(parent::current(), NULL, $this->options);
  }
  else {
    $splos = new SplObjectStorage();
    $splos
      ->attach(parent::current());
    $this->qp
      ->setMatches($splos);
  }
  return $this->qp;
}