private function QueryPath::getNthMatch in QueryPath 7.3
Same name and namespace in other branches
- 6 QueryPath/QueryPath.php \QueryPath::getNthMatch()
- 7.2 QueryPath/QueryPath.php \QueryPath::getNthMatch()
2 calls to QueryPath::getNthMatch()
- QueryPath::eq in QueryPath/
QueryPath.php - QueryPath::get in QueryPath/
QueryPath.php
File
- QueryPath/
QueryPath.php, line 1923
Class
Code
private function getNthMatch($index) {
if ($index > $this->matches
->count() || $index < 0) {
return;
}
$i = 0;
foreach ($this->matches as $m) {
if ($i++ == $index) {
return $m;
}
}
}