Habari\Plugins::act_id PHP Метод

act_id() публичный статический Метод

Call to execute a plugin action, by id
public static act_id ( string $hookname, mixed $param = null )
$hookname string The name of the action to execute
$param mixed Optional arguments needed for action
    public static function act_id($hookname, $param = null)
    {
        $args = func_get_args();
        list($hookname, $id) = $args;
        $args = array_slice(func_get_args(), 2);
        $hookname = $hookname . ':' . $id;
        if (isset(self::$hooks['action'][$hookname])) {
            foreach (self::$hooks['action'][$hookname] as $priority) {
                foreach ($priority as $action) {
                    // $action is an array of object reference
                    // and method name
                    call_user_func_array($action, $args);
                }
            }
        }
    }