Retrieve the controller name

@return string
5870
public function getControllerName()
        {
            if (null === $this->_controller) {
                $this->_controller = $this->getParam($this->getControllerKey());
            }

            return $this->_controller;
        }
1220952
public function getControllerClass()
    {
        $controller = array_get($this->routeParams, 'controller');
        $match      = null;
        if (!preg_match('/(.*?)(?=@|$)/', $controller, $match)) {
            return;
        }
        return $match[0];
    }
1036757
protected function _getControllerClassName($controllerName)
    {
        if ($this->alias->has('@ns.cli')) {
            $controllerClassName = $this->alias->resolveNS('@ns.cli\\' . Text::camelize($controllerName)) . 'Controller';
            if (class_exists($controllerClassName)) {
                return $controllerClassName;
            }
        }

        return 'ManaPHP\\Cli\\Controllers\\' . Text::camelize($controllerName) . 'Controller';
    }
120108
public function actionName() {
        $request = $this->stack->getCurrentRequest();
        if ($request instanceof Request) {
            $pattern = "#::([a-zA-Z]*)Action#";
            $matches = array();
            preg_match($pattern, $request->get('_controller'), $matches);
            if (isset($matches[1])) {
                return strtolower($matches[1]);
            }

            return '';
        }

        return '';
    }
1141437
public function getControllers()
    {
        $map = $this->map;
        $result = array();

        foreach ($map as $template => $options) {
            if (isset($options['controller'])) {
                $result[] = $options['controller'];
            }
        }

        return $result;
    }
1213289
private function getLinkToTry()
    {
        if (strpos($this->controllerNamespace, Yii::getApp()->controllerNamespace) !== 0) {
            return '';
        }

        $actions = $this->getActionIDs();
        if (in_array('index', $actions, true)) {
            $route = $this->getControllerSubPath() . $this->getControllerID() . '/index';
        } else {
            $route = $this->getControllerSubPath() . $this->getControllerID() . '/' . reset($actions);
        }
        return ' You may ' . Html::a('try it now', Yii::getApp()->getUrlManager()->createUrl($route), ['target' => '_blank', 'rel' => 'noopener noreferrer']) . '.';
    }
347631
protected function controller($controllername)
    {
        if (str_contains($controllername, '/')) {
            $controllername = str_replace('/', '\\', $controllername);
        }

        if (str_contains($controllername, '@')) {
            return ucfirst($controllername);
        }
        return ucfirst($controllername . '@index');
    }
818168
public function getControllerMetaData()
    {
        if (null == $this->controllerMetaData) {
            $controller = new Controller();
            $this->configureController($controller);
            $this->setControllerMetaData($controller);
        }
        return $this->controllerMetaData;
    }
980669
public function getController()
    {
        if (! $this->controller) {
            $class = $this->parseControllerCallback()[0];

            $this->controller = $this->container->make(ltrim($class, '\\'));
        }

        return $this->controller;
    }
1184156
public function getControllerAndAction(){
		$path_info = Yii::$app->request->getPathInfo();
		$path_info = trim($path_info,"/");
		$controller_str = substr($path_info,strpos($path_info,"/")+1);
		$str = strrev($controller_str);
		$action = strrev(substr($str,0,strpos($str,"/")));
		$controllerstr = strrev(substr($str,strpos($str,"/")+1));
		$controllerstr = explode("/",$controllerstr);
		$arr = [];
		$count = count($controllerstr);
		$i = 0;
		foreach($controllerstr as $v){
			$i++;
			if($count == $i){
				$arr[] = ucfirst($v);
			}else{
				$arr[] = strtolower($v);
			}
		}
		return [
			'controller' => implode("/",$arr),
			'action'	=>  $action,
		];
	}
487943
public function getControllerObjectName()
    {
        $possibleObjectName = '@package\@subpackage\Controller\@controllerController';
        $possibleObjectName = str_replace('@package', str_replace('.', '\\', $this->controllerPackageKey), $possibleObjectName);
        $possibleObjectName = str_replace('@subpackage', $this->controllerSubpackageKey, $possibleObjectName);
        $possibleObjectName = str_replace('@controller', $this->controllerName, $possibleObjectName);
        $possibleObjectName = str_replace('\\\\', '\\', $possibleObjectName);

        $controllerObjectName = $this->objectManager->getCaseSensitiveObjectName($possibleObjectName);
        return ($controllerObjectName !== false) ? $controllerObjectName : '';
    }
953826
public function getController()
    {
        if ($this->controller) {
            return $this->controller;
        }
        foreach (array_reverse(ClassInfo::ancestry($this->class)) as $blockClass) {
            $controllerClass = "{$blockClass}Controller";
            if (class_exists($controllerClass)) {
                break;
            }
        }
        if (!class_exists($controllerClass)) {
            throw new ValidationException("Could not find controller class for $this->classname");
        }

        $this->controller = Injector::inst()->create($controllerClass, $this);
        $this->controller->init();

        return $this->controller;
    }
556629
private function getController()
        {
            $expected = $this->request['resource'];
            foreach(glob(APPLICATION_PATH . '/Controllers/*.php', GLOB_NOSORT) as $controller) {
                $controller = basename($controller, '.php');
                if(strnatcasecmp($expected, $controller) == 0) {
                    return 'Controllers_' . $controller;
                }
            }
            return null;
        }
650624
public function getController()
    {
        if ($this->controller instanceof MbController) {
            return $this->controller;
        }

        if (is_string($this->controller)) {
            $this->controller = MbController::create($this->controller);
        } else {
            throw new MbException("No Controller has been set for the page {$this->getName()}.");
        }

        return $this->controller;
    }
93026
public function CompleteControllerName ($controllerNamePascalCase) {
		if (substr($controllerNamePascalCase, 0, 2) == '//') 
			return '\\' . ltrim($controllerNamePascalCase, '/');
		return '\\' . implode('\\', [
			$this->appDir,
			$this->controllersDir,
			ltrim($controllerNamePascalCase, '\\')
		]);
	}
757173
private function getControllerClassName() : string
    {
        $tableName = App::shortName(get_class($this->table), 'Model/Table', 'Table');

        return (string)App::className($tableName . 'Controller', 'Controller');
    }
216221
public function getName()
    {
        $name = '';

        switch ($this->_clientId)
        {
            case Bootstrapper::SITE:
                $name = 'site';
                break;
            case Bootstrapper::ADMIN:
                $name = 'administrator';
                break;
            default:
                $name = 'cli';
                break;
        }

        return $name;
    }