Devise\Users\Permissions\RuleList::__call PHP Method

__call() public method

Handle execution of the different types of methods
public __call ( string $method, array $arguments = [] ) : Void | Exceptio\Exception
$method string Name of function/method
$arguments array Any arguments required by method
return Void | Exceptio\Exception | Exception
    public function __call($method, $arguments = array())
    {
        if (in_array($method, $this->rules)) {
            // check if closer exists allowing methods to be overwritten
            if (isset($this->closures[$method])) {
                return call_user_func_array($this->closures[$method], $arguments);
            } else {
                if (in_array($method, get_class_methods($this))) {
                    // check if function is a class method, if it is then execute it
                    return call_user_func_array(array($this, $method), $arguments);
                } else {
                    throw new Exception('Unknown Function "' . $method . '" in RuleList');
                }
            }
        } else {
            throw new Exception('Unknown Function "' . $method . '" in RuleList');
        }
    }