src/AuraInputInterceptor.php
private function getNamedArguments(MethodInvocation $invocation)
    {
        $submit = [];
        $params = $invocation->getMethod()->getParameters();
        $args = $invocation->getArguments()->getArrayCopy();
        foreach ($params as $param) {
            $arg = array_shift($args);
            $submit[$param->getName()] = $arg;
        }
        // has token ?
        if (isset($_POST[AntiCsrf::TOKEN_KEY])) {
            $submit[AntiCsrf::TOKEN_KEY] = $_POST[AntiCsrf::TOKEN_KEY];
        }

        return $submit;
    }
private function getNamedArguments(MethodInvocation $invocation)
    {
        $submit = [];
        $params = $invocation->getMethod()->getParameters();
        $args = $invocation->getArguments()->getArrayCopy();
        foreach ($params as $param) {
            $arg = array_shift($args);
            $submit[$param->getName()] = $arg;
        }
        // has token ?
        if (isset($_POST[AntiCsrf::TOKEN_KEY])) {
            $submit[AntiCsrf::TOKEN_KEY] = $_POST[AntiCsrf::TOKEN_KEY];
        }

        return $submit;
    }
private function getNamedArguments ( MethodInvocation $ invocation ) { $ submit = [ ] ; $ params = $ invocation -> getMethod ( ) -> getParameters ( ) ; $ args = $ invocation -> getArguments ( ) -> getArrayCopy ( ) ; foreach ( $ params as $ param ) { $ arg = array_shift ( $ args ) ; $ submit [ $ param -> getName ( ) ] = $ arg ; } // has token ? if ( isset ( $ _POST [ AntiCsrf :: TOKEN_KEY ] ) ) { $ submit [ AntiCsrf :: TOKEN_KEY ] = $ _POST [ AntiCsrf :: TOKEN_KEY ] ; } return $ submit ; }
Return arguments as named arguments.

@param MethodInvocation $invocation

@return array
Return arguments as named arguments .