protected function marshal($command, ArrayAccess $source, array $extras = [])
    {
        $injected = [];

        $reflection = new ReflectionClass($command);

        if ($constructor = $reflection->getConstructor()) {
            $injected = array_map(function ($parameter) use ($command, $source, $extras) {
                return $this->getParameterValueForCommand($command, $source, $parameter, $extras);
            }, $constructor->getParameters());
        }

        return $reflection->newInstanceArgs($injected);
    }
protected function marshal($command, ArrayAccess $source, array $extras = [])
    {
        $injected = [];

        $reflection = new ReflectionClass($command);

        if ($constructor = $reflection->getConstructor()) {
            $injected = array_map(function ($parameter) use ($command, $source, $extras) {
                return $this->getParameterValueForCommand($command, $source, $parameter, $extras);
            }, $constructor->getParameters());
        }

        return $reflection->newInstanceArgs($injected);
    }
protected function marshal ( $ command , ArrayAccess $ source , array $ extras = [ ] ) { $ injected = [ ] ; $ reflection = new ReflectionClass ( $ command ) ; if ( $ constructor = $ reflection -> getConstructor ( ) ) { $ injected = array_map ( function ( $ parameter ) use ( $ command , $ source , $ extras ) { return $ this -> getParameterValueForCommand ( $ command , $ source , $ parameter , $ extras ) ; } , $ constructor -> getParameters ( ) ) ; } return $ reflection -> newInstanceArgs ( $ injected ) ; }
Marshal a command from the given array accessible object.

@param string       $command
@param \ArrayAccess $source
@param array        $extras

@return mixed
Marshal a command from the given array accessible object .