Habari\RewriteRule::arg_match PHP Метод

arg_match() публичный Метод

Returns a distance from 0 indicating the appropriateness of the rule based on the passed-in arguments.
public arg_match ( array $args ) : integer
$args array An array of arguments
Результат integer Returns 0 for an exact match, a higher number for less of a match
    public function arg_match($args)
    {
        return 0;
        // Let's let this logic linger for a little while
        /* This needs further testing once that logic is established */
        $named_args = $this->named_args;
        // Direct call prints a PHP notice
        $named_args_combined = array_flip(array_merge($named_args['required'], $named_args['optional']));
        $args = Plugins::filter('rewrite_args', $args, $this->name);
        $diffargs = array_diff_key($args, $named_args_combined);
        $sameargs = array_intersect_key($args, $named_args_combined);
        $rating = count($named_args_combined) - count($sameargs) + count($diffargs);
        return $rating;
    }