public function QueryPath::__call in QueryPath 6
Same name and namespace in other branches
- 7.3 QueryPath/QueryPath.php \QueryPath::__call()
- 7.2 QueryPath/QueryPath.php \QueryPath::__call()
File
- QueryPath/
QueryPath.php, line 2020
Class
Code
public function __call($name, $arguments) {
if (!QueryPathExtensionRegistry::$useRegistry) {
throw new QueryPathException("No method named {$name} found (Extensions disabled).");
}
if (empty($this->ext)) {
$this->ext = QueryPathExtensionRegistry::getExtensions($this);
}
if (!empty($this->ext) && QueryPathExtensionRegistry::hasMethod($name)) {
$owner = QueryPathExtensionRegistry::getMethodClass($name);
$method = new ReflectionMethod($owner, $name);
return $method
->invokeArgs($this->ext[$owner], $arguments);
}
throw new QueryPathException("No method named {$name} found. Possibly missing an extension.");
}