method to test which apps implement a hook

This commit is contained in:
Ralf Becker 2013-05-03 15:31:09 +00:00
parent bb17f1ae3d
commit 24604bdb5d

View File

@ -201,6 +201,18 @@ class hooks
return count($this->locations[$location][$app]);
}
/**
* check which apps implement a given hook
*
* @param string $location location-name
* @return array of apps implementing given hook
*/
function hook_implemented($location)
{
//error_log(__METHOD__.__LINE__.array2string($this->locations[$location]));
return isset($this->locations[$location]) ? array_keys($this->locations[$location]) : array();
}
/**
* Register and/or de-register an application's hooks
*