You are here

public function QueryPathIterator::current in QueryPath 6

Same name and namespace in other branches
  1. 7.3 QueryPath/QueryPath.php \QueryPathIterator::current()
  2. 7.2 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;
}