public function QueryPath::get in QueryPath 7.2
Same name and namespace in other branches
- 6 QueryPath/QueryPath.php \QueryPath::get()
- 7.3 QueryPath/QueryPath.php \QueryPath::get()
1 call to QueryPath::get()
- QueryPath::toArray in QueryPath/
QueryPath.php
File
- QueryPath/
QueryPath.php, line 302
Class
Code
public function get($index = NULL, $asObject = FALSE) {
if (isset($index)) {
return $this
->size() > $index ? $this
->getNthMatch($index) : NULL;
}
if (!$asObject) {
$matches = array();
foreach ($this->matches as $m) {
$matches[] = $m;
}
return $matches;
}
return $this->matches;
}