private function createDispatch(array $arguments)
    {
        $arguments['controller'] = $this->filterName($arguments['controller']);
        $data = [
            'className' => ltrim(
                "{$arguments['namespace']}"."\\"."{$arguments['controller']}",
                "\\"
            ),
            'method' => lcfirst($this->filterName($arguments['action'])),
            'arguments' => $arguments['args']
        ];
        $reflection = new \ReflectionClass(ControllerDispatch::class);
        return $reflection->newInstanceArgs($data);
    }
private function createDispatch(array $arguments)
    {
        $arguments['controller'] = $this->filterName($arguments['controller']);
        $data = [
            'className' => ltrim(
                "{$arguments['namespace']}"."\\"."{$arguments['controller']}",
                "\\"
            ),
            'method' => lcfirst($this->filterName($arguments['action'])),
            'arguments' => $arguments['args']
        ];
        $reflection = new \ReflectionClass(ControllerDispatch::class);
        return $reflection->newInstanceArgs($data);
    }
private function createDispatch ( array $ arguments ) { $ arguments [ 'controller' ] = $ this -> filterName ( $ arguments [ 'controller' ] ) ; $ data = [ 'className' => ltrim ( "{$arguments['namespace']}" . "\\" . "{$arguments['controller']}" , "\\" ) , 'method' => lcfirst ( $ this -> filterName ( $ arguments [ 'action' ] ) ) , 'arguments' => $ arguments [ 'args' ] ] ; $ reflection = new \ ReflectionClass ( ControllerDispatch :: class ) ; return $ reflection -> newInstanceArgs ( $ data ) ; }
Create a controller dispatch with provided arguments

@param array $arguments

@return ControllerDispatch|Object
Create a controller dispatch with provided arguments