protected function findControllerAndMethod(array $action)
    {
        if (isset($action['_controller']) || $action['uses']) {
            $controller = isset($action['_controller']) ? $action['_controller'] : $action['uses'];

            if (strstr($controller, ':')) {
                list($controller, $method) = explode(':', $controller);
            } elseif ($action['_method']) {
                $method = $action['_method'];
            }


            $namespace = $this->findNamespaceInController($controller);

            return [$controller, $method, $namespace];

        } else {
            throw new ControllerException('Your controller variable could not found in your route');
        }
    }
protected function findControllerAndMethod(array $action)
    {
        if (isset($action['_controller']) || $action['uses']) {
            $controller = isset($action['_controller']) ? $action['_controller'] : $action['uses'];

            if (strstr($controller, ':')) {
                list($controller, $method) = explode(':', $controller);
            } elseif ($action['_method']) {
                $method = $action['_method'];
            }


            $namespace = $this->findNamespaceInController($controller);

            return [$controller, $method, $namespace];

        } else {
            throw new ControllerException('Your controller variable could not found in your route');
        }
    }
protected function findControllerAndMethod ( array $ action ) { if ( isset ( $ action [ '_controller' ] ) || $ action [ 'uses' ] ) { $ controller = isset ( $ action [ '_controller' ] ) ? $ action [ '_controller' ] : $ action [ 'uses' ] ; if ( strstr ( $ controller , ':' ) ) { list ( $ controller , $ method ) = explode ( ':' , $ controller ) ; } elseif ( $ action [ '_method' ] ) { $ method = $ action [ '_method' ] ; } $ namespace = $ this -> findNamespaceInController ( $ controller ) ; return [ $ controller , $ method , $ namespace ] ; } else { throw new ControllerException ( 'Your controller variable could not found in your route' ) ; } }
find controller, method and namespace in action variable

@param array $action
@return array
@throws ControllerException
find controller method and namespace in action variable