Forward cas() method params to casInternal() method.
@param  OperationArguments $args
@return bool
341548
private function forwardCas(OperationArguments $args)
    {
        if ($args->has('expiry')) {
            return $this->casInternal($args->getCasToken(), $args->getKey(), $args->getValue(), $args->getExpiry());
        }
        return $this->casInternal($args->getCasToken(), $args->getKey(), $args->getValue());
    }
56784
private function hasTooManyArguments(array $argumentValues, array $commandArguments) : bool
    {
        if (count($argumentValues) > count($commandArguments)) {
            // Only when the last argument is an array do we allow more request arguments than command arguments
            if (count($commandArguments) === 0 || !end($commandArguments)->isArray()) {
                return true;
            }
        }

        return false;
    }
1150379
public function execute(array $args, array $options = [])
    {
        if (!isset($args[0])) {
            throw new \InvalidArgumentException('arg action must be input');
        }
        $action = explode('::', $args[0]);
        if (!class_exists($action[0])) {
            throw new \InvalidArgumentException('action not not found!');
        }

        if (isset($args[1])) {
            $frequency = abs(intval($args[1]));
        } else {
            $frequency = null;
        }
        ProcessManage::addTask($action, $frequency);
    }
989530
public function RPCall($method, $args)
    {
        if (!is_callable($f = [$this->pool, 'RPCall'])) {
            return false;
        }
        return $f($method, $args);
    }
88912
public function forward($logic, ...$params)
    {
        $context = clone $this;
        $context->depth++;
        $context->params = $params;
        return call_user_func($this->forwarder, $context, $logic);
    }
701239
protected function doOperation($operation, OperationArguments $args)
    {
        try {
            // Trigger 'beforeOperation' event.
            $this->fireBeforeOperation($operation, $args);
            // Run the internal operation.
            $forwardMethod = 'forward' . ucfirst($operation);
            $returnValue   = call_user_func([$this, $forwardMethod], $args);
            // Trigger 'afterOperation' event.
            $this->fireAfterOperation($operation, $args, $returnValue);
            // Return the operation result.
            return $returnValue;
        } catch (Exception $e) {
            // Trigger 'onOperationException' event.
            $this->fireOnOperationException($operation, $args, $e);
            // Throw the original exception.
            throw $e;
        }
    }
809622
public function withArgs($args = [])
    {
        if (!is_array($args)) {
            $args = func_get_args();
        }

        $this->args = $args;
        return $this;
    }
1091719
function parseExtensionArgs($args)
    {
        // preferred_auth_policies is a space-separated list of policy
        // URIs
        $this->preferred_auth_policies = array();

        $policies_str = Auth_OpenID::arrayGet($args, 'preferred_auth_policies');
        if ($policies_str) {
            foreach (explode(' ', $policies_str) as $uri) {
                if (!in_array($uri, $this->preferred_auth_policies)) {
                    $this->preferred_auth_policies[] = $uri;
                }
            }
        }

        // max_auth_age is base-10 integer number of seconds
        $max_auth_age_str = Auth_OpenID::arrayGet($args, 'max_auth_age');
        if ($max_auth_age_str) {
            $this->max_auth_age = Auth_OpenID::intval($max_auth_age_str);
        } else {
            $this->max_auth_age = null;
        }
    }
651396
public function auto(Argument $args, $total, array $callableArgs = [])
    {
        $args = $this->protectArgs($args);

        if ($args['last']) {
            $connection = $this->backward($args, $total, $callableArgs);
        } else {
            $connection = $this->forward($args);
        }

        if ($this->promise) {
            return $connection->then(function (ConnectionInterface $connection) use ($total, $callableArgs) {
                $connection->setTotalCount($this->computeTotalCount($total, $callableArgs));

                return $connection;
            });
        } else {
            $connection->setTotalCount($this->computeTotalCount($total, $callableArgs));

            return $connection;
        }
    }
127109
public function RPCall($method, $args)
    {
        if (!$this->enableRPC || !is_callable([$this, $method])) {
            return false;
        }
        $func = [$this, $method];
        return $func(...$args);
    }
1233680
private function parse($args)
    {
        foreach ($args as $argument) {
            $this->arguments->push($argument);
            if ($this->detectFlags($argument)) {
                continue;
            }
            if ($this->detectOptions($argument)) {
                continue;
            }
            if ($this->detectConcatFlag($argument)) {
                continue;
            }
            $this->commands->push($argument);
        }
    }
1356077
public static function keyMatch3Func(...$args)
    {
        $name1 = $args[0];
        $name2 = $args[1];

        return self::keyMatch3($name1, $name2);
    }
252253
public function validateArgument($argname, $value, $type, $nullable = false)
    {
        if (!$this->checkType($value, $type, $nullable)) {
            throw new OperationArgumentException(sprintf(
                'Method %s() expects $%s to be %s, %s given.',
                $this->operation,
                $argname,
                $type,
                gettype($value)
            ));
        }
    }
103580
public function validate($args)
    {
        $matched = false;

        //validates arguments
        foreach ($args as $arg => $value) {
            //non-named option are skipped from validation
            if (is_numeric($arg)) continue;
            //validates action options
            foreach ($this->options as $option) {
                //checks if options matches specified parameter
                if ($option->matchParam($arg)) {
                    //validates option
                    if (!$option->validate($value)) {
                        throw new InvalidArgumentException($arg, $value);
                    }
                    $matched = true;
                }
            }
            if (!$matched) {
                throw new InvalidOptionException($arg);
            }
        }
        //validates required options
        foreach ($this->options as $option) {
            if (!$option->isRequired()) {
                continue;
            }

            if (!$option->getValue($args)) {
                throw new MissingRequiredArgumentException($option->getName());
            }
        }

        return true;
    }
105917
private function cmdPurge($args)
    {
        $cmd = new PurgeCommand($this->cwd);

        return $cmd->run(array_slice($args, 1));
    }
679908
private function cmdClone($args)
    {
        $cmd = new CloneCommand($this->cwd);

        return $cmd->run(array_slice($args, 1));
    }
607149
public function matchArgs($args)
    {
        if ($this->_args === null || $args === null) {
            return true;
        }
        $arg = $this->_classes['arg'];
        foreach ($this->_args as $expected) {
            $actual = array_shift($args);
            if ($expected instanceof $arg) {
                if (!$expected->match($actual)) {
                    return false;
                }
            } elseif ($actual !== $expected) {
                return false;
            }
        }
        return true;
    }