$hooks

This class is for internal use. You should manipulate hooks from Wire-derived classes instead.

Click any linked item for full usage details and examples. Hookable methods are indicated with the icon.

Show $var?     Show args?       Only hookable?    

Common

NameReturnSummary 
$hooks->addHook(Wire $object, $method, $toObject)
string

Hook a function/method to a hookable method call in this object

 
$hooks->allowPathHooks()
bool

Get or set whether path hooks are allowed

 
$hooks->className()
string

@return string

 
$hooks->filterHooks(array $hooks, string $property, $value)
array

Filter and return hooks matching given property and value

 
$hooks->filterPathHooks(string $requestPath)
array bool

Return path hooks that have potential to match given request path

 
$hooks->getAllLocalHooks()
array

Return the "all local hooks" cache

 
$hooks->getAllPathHooks()
array

Return all pending path hooks

 
$hooks->getClassParents($object)
array

Get an array of parent classes and interfaces for the given object

 
$hooks->getHooks(Wire $object)
array

Return all hooks associated with $object or method (if specified)

 
$hooks->getPathHookRedirect()
string

Return redirect URL required by an applicable path hook, or blank otherwise

 
$hooks->hasHook(Wire $object, string $method)
bool

Similar to isHooked(), returns true if the method or property hooked, false if it isn't.

 
$hooks->hasPathHooks()
bool

Return whether or not any path hooks are pending

 
$hooks->isHooked(string $method)
bool

Returns true if the method/property hooked, false if it isn't.

 
$hooks->isMethodHooked($class, string $method)
bool

Similar to isHooked() method but also checks parent classes for the hooked method as well

 
$hooks->isPropertyHooked($class, string $property)
bool

Similar to isHooked() method but also checks parent classes for the hooked property as well

 
$hooks->removeHook(Wire $object, $hookID)
Wire

Given a Hook ID provided by addHook() this removes the hook

 
$hooks->runHooks(Wire $object, string $method, array $arguments)
array

Provides the implementation for calling hooks in ProcessWire

 

API reference based on ProcessWire core version 3.0.252