PhpDeal\Aspect\AbstractContractAspect::fetchMethodArguments PHP Méthode

fetchMethodArguments() protected méthode

Returns an associative list of arguments for the method invocation
protected fetchMethodArguments ( Go\Aop\Intercept\MethodInvocation $invocation ) : array
$invocation Go\Aop\Intercept\MethodInvocation
Résultat array
    protected function fetchMethodArguments(MethodInvocation $invocation)
    {
        $parameters = $invocation->getMethod()->getParameters();
        $argumentNames = array_map(function (\ReflectionParameter $parameter) {
            return $parameter->name;
        }, $parameters);
        $parameters = array_combine($argumentNames, $invocation->getArguments());
        return $parameters;
    }