public function controller($controller_name)
    {
        // Retrieving the class and method to launch.
        if (is_null($controller_name)) {
            return null;
        }

        $parts = preg_split('/::|@/', $controller_name);

        if (count($parts) == 1) {
            $parts[1] = '__invoke';
        }

        list($class, $method) = $parts;

        if (!class_exists($class, true)) {
            $class = sprintf('%s\\%s', $this->namespaces['controller'], ucfirst($class));
        }

        $injections = $this->injector($class, $method);

        return [
            'action' => [new $class(), $method],
            'injection' => $injections
        ];
    }
public function controller($controller_name)
    {
        // Retrieving the class and method to launch.
        if (is_null($controller_name)) {
            return null;
        }

        $parts = preg_split('/::|@/', $controller_name);

        if (count($parts) == 1) {
            $parts[1] = '__invoke';
        }

        list($class, $method) = $parts;

        if (!class_exists($class, true)) {
            $class = sprintf('%s\\%s', $this->namespaces['controller'], ucfirst($class));
        }

        $injections = $this->injector($class, $method);

        return [
            'action' => [new $class(), $method],
            'injection' => $injections
        ];
    }
public function controller ( $ controller_name ) { // Retrieving the class and method to launch. if ( is_null ( $ controller_name ) ) { return null ; } $ parts = preg_split ( '/::|@/' , $ controller_name ) ; if ( count ( $ parts ) == 1 ) { $ parts [ 1 ] = '__invoke' ; } list ( $ class , $ method ) = $ parts ; if ( ! class_exists ( $ class , true ) ) { $ class = sprintf ( '%s\\%s' , $ this -> namespaces [ 'controller' ] , ucfirst ( $ class ) ) ; } $ injections = $ this -> injector ( $ class , $ method ) ; return [ 'action' => [ new $ class ( ) , $ method ] , 'injection' => $ injections ] ; }
Load the controllers defined as string

@param string $controller_name

@return array
Load the controllers defined as string