protected function parseController($controller)
    {
        if (!is_array($controller) || !is_object($controller[0]) || !isset($controller[1])) {
            return null;
        }

        if (!preg_match('#Controller\\\(.+)Controller$#', get_class($controller[0]), $matches)) {
            return null;
        }

        return ['name' => $matches[1], 'action' => $controller[1]];
    }
protected function parseController($controller)
    {
        if (!is_array($controller) || !is_object($controller[0]) || !isset($controller[1])) {
            return null;
        }

        if (!preg_match('#Controller\\\(.+)Controller$#', get_class($controller[0]), $matches)) {
            return null;
        }

        return ['name' => $matches[1], 'action' => $controller[1]];
    }
protected function parseController ( $ controller ) { if ( ! is_array ( $ controller ) || ! is_object ( $ controller [ 0 ] ) || ! isset ( $ controller [ 1 ] ) ) { return null ; } if ( ! preg_match ( '#Controller\\\(.+)Controller$#' , get_class ( $ controller [ 0 ] ) , $ matches ) ) { return null ; } return [ 'name' => $ matches [ 1 ] , 'action' => $ controller [ 1 ] ] ; }
Parse controller to extract its name

@param mixed $controller

@return string
Parse controller to extract its name