kahlan\Arg::__callStatic PHP Method

__callStatic() public static method

Create an Argument Matcher
public static __callStatic ( string $name, array $args ) : boolean
$name string The name of the matcher.
$args array The arguments to pass to the matcher.
return boolean
    public static function __callStatic($name, $args)
    {
        $not = false;
        if (preg_match('/^not/', $name)) {
            $matcher = lcfirst(substr($name, 3));
            $not = true;
        } else {
            $matcher = $name;
        }
        $class = static::$_classes['matcher'];
        if ($matchers = $class::get($matcher, true)) {
            return new static(compact('name', 'matchers', 'not', 'args'));
        }
        throw new Exception("Unexisting matchers attached to `'{$name}'`.");
    }