Illuminate\Bus\Dispatcher::marshal PHP Метод

marshal() защищенный метод

Marshal a command from the given array accessible object.
protected marshal ( string $command, ArrayAccess $source, array $extras = [] ) : mixed
$command string
$source ArrayAccess
$extras array
Результат mixed
    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);
    }