Falcon_Autohooker::add_filter PHP Метод

add_filter() защищенный статический Метод

This is exactly the same as {@see \add_filter()} but instead of passing a full callback, only the method needs to be passed in.
protected static add_filter ( string $hook, string $method = null, integer $priority = 10, $params = null, string $class = null )
$hook string Filter name
$method string Method name on current class, or priority (as an int)
$priority integer Specify the order in which the functions associated with a particular action are executed (default: 10)
$class string Internal use only
    protected static function add_filter($hook, $method = null, $priority = 10, $params = null, $class = null)
    {
        if ($method === null) {
            $method = $hook;
        } elseif (is_int($method)) {
            $priority = $method;
            $method = $hook;
        }
        if ($class === null) {
            $class = get_called_class();
        }
        if (!method_exists($class, $method)) {
            throw new InvalidArgumentException('Method does not exist');
        }
        if ($params === null) {
            $ref = new ReflectionMethod($class, $method);
            $params = $ref->getNumberOfParameters();
        }
        return add_filter($hook, array($class, $method), $priority, $params);
    }