$useRegistry
$useRegistry :
Internal flag indicating whether or not the registry should be used for automatic extension loading. If this is false, then implementations should not automatically load extensions.
A registry for QueryPath extensions.
QueryPath extensions should call the QueryPath::ExtensionRegistry::extend() function to register their extension classes. The QueryPath library then uses this information to determine what QueryPath extensions should be loaded and executed.
Extensions are attached to a Query object.
To enable an extension (the easy way), use QueryPath::enable().
This class provides lower-level interaction with the extension mechanism.
hasMethod(string $name) : boolean
Check to see if a method is known.
This checks to see if the given method name belongs to one of the registered extensions. If it does, then this will return TRUE.
string | $name | The name of the method to search for. |
TRUE if the method exists, false otherwise.
hasExtension(string $name) : boolean
Check to see if the given extension class is registered.
Given a class name for a QueryPath::Extension class, this will check to see if that class is registered. If so, it will return TRUE.
string | $name | The name of the class. |
TRUE if the class is registered, FALSE otherwise.
getMethodClass(string $name) : string
Get the class that a given method belongs to.
Given a method name, this will check all registered extension classes to see if any of them has the named method. If so, this will return the classname.
Note that if two extensions are registered that contain the same method name, the last one registred will be the only one recognized.
string | $name | The name of the method. |
The name of the class.
getExtensions(\QueryPath\Query $qp) : array
Get extensions for the given Query object.
Given a Query object, this will return an associative array of extension names to (new) instances. Generally, this is intended to be used internally.
\QueryPath\Query | $qp | The Query into which the extensions should be registered. |
An associative array of classnames to instances.