You are here

public function QueryPath::index in QueryPath 6

Same name and namespace in other branches
  1. 7.3 QueryPath/QueryPath.php \QueryPath::index()
  2. 7.2 QueryPath/QueryPath.php \QueryPath::index()

File

QueryPath/QueryPath.php, line 536

Class

QueryPath

Code

public function index($subject) {
  $i = 0;
  foreach ($this->matches as $m) {
    if ($m === $subject) {
      return $i;
    }
    ++$i;
  }
  return FALSE;
}