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]];
    }