Создаёт новый инстанс объекта контроллера.

@return Controller
342773
public function instanceController(): Controller
    {
        $this->sawContainer->setEnvironment(SawEnv::controller());

        return new Controller(
            $this->container->get('WorkCycle'),
            $this->container->get(ControllerCore::class),
            $this->container->get('ControllerServer'),
            $this->container->get(CommandDispatcher::class),
            $this->daemonConfig->getControllerPid() // todo
        );
    }
286513
public function getPayController()
    {
        if ($this->_payController === null) {
            $this->_payController = $this->createControllerById('pay');
        }

        return $this->_payController;
    }
442664
public function getController()
    {
        if (! ($this->_controller instanceof LibBaseControllerAbstract)) {

            //Make sure we have a controller identifier
            if (! ($this->_controller instanceof AnServiceIdentifier)) {
                $this->setController($this->_controller);
            }

            $config = array(
                'response' => $this->getResponse(),
                'request' => $this->_request,
                'dispatched' => true,
            );

            $this->_controller = $this->getService($this->_controller, $config);
        }

        return $this->_controller;
    }
762214
public function dispatch()
    {

        $name = $this->generateClassName($this->namespace, $this->class);

        // the controller instance
        $controller = App::make($name);


        if ($controller instanceof Controller) {
            // register the parameters
            $controller->runControllerWithParameters(ParameterBag::getParameters());


            // return the instance
            return $controller;
        } else {
            throw new ControllerException(sprintf('%s is not a instance of  controller', $name));
        }
    }
293422
public function getControl()
	{
		$container = clone $this->container;
		parent::getControl();
		$control = Html::el("div", array("style" => "text-align:justify"));
		$control->setHtml($this->translate((string)$this->getValue()));
		$container->add($control);

		return $container;
	}
583950
public function controller()
	{
		if(!$this->hasController()) {
			throw new InvalidControllerException('Could get controller of ' . get_class($this) . '. Please fill $controller property.');
		}

		return app()->make($this->controller);
	}
325289
protected function _crud()
    {
        if (!$this->_controller->Crud) {
            return $this->_controller->components()->load('Crud.Crud');
        }

        return $this->_controller->Crud;
    }
735309
public function url()
    {
        $args = func_get_args();
        $controller = array_shift($args);

        $url = $this->urlBuilder->createUrl($controller, $args);

        if ($url === false) {
            return $controller;
        } else {
            return $url;
        }
    }
1301774
public function WidgetControllers()
    {
        $controllers = new ArrayList();
        $items = $this->ItemsToRender();
        if (!is_null($items)) {
            foreach ($items as $widget) {
                /** @var Widget $widget */

                /** @var Controller $controller */
                $controller = $widget->getController();

                $controller->doInit();
                $controllers->push($controller);
            }
        }
        return $controllers;
    }
590562
public function getController() {
        if(!empty($this->controller)) {
            return $this->controller;
        } else {
            preg_match('@(?:m[a-zA-Z0-9]{1,})_([a-zA-Z0-9]{1,})_(?:create)_([^/]+)_(?:table)@i', get_class($this), $matches);
            return $matches[2];
        }
    }
1087499
protected function _getController()
    {
        $controller = parent::_getController();
        $cors = new CorsMiddleware();
        $controller->response = $cors(
            $controller->request, $controller->response,
            function($request, $response){ return $response; }
        );
        return $controller;
    }
881928
public function getController()
    {
        if (isset($this->uris[0]) && '' !== $this->uris[0]) {
            $_controller = $this->uris[0];
        } else {
            throw new NotFoundException('Cannot dispatch controller name.');
        }

        return strip_tags($_controller);
    }
369049
protected function getControllers()
    {
        $controllers = new Collection;

        if ($controller = $this->option('use-controller')) {
            $this->addControllerIfNotExists($controllers, app($controller));

            return $controllers;
        }

        foreach ($this->router->getRoutes() as $collections) {
            foreach ($collections as $route) {
                if ($controller = $route->getControllerInstance()) {
                    $this->addControllerIfNotExists($controllers, $controller);
                }
            }
        }

        return $controllers;
    }
923389
public function getBuiltPaymorrowRequestController()
    {
        $oPmRequestController = $this->getPaymorrowRequestController();

        $oPmGateway = $this->buildPaymorrowGateway();

        $oPmRequestController->setGateway( $oPmGateway );

        return $oPmRequestController;
    }
131089
private function generateBasicController()
    {
        $controllerClass = $this->applicationDir.DS.'Controllers'.DS.$this->controller.'Controller'.EXT;

        if (file_exists($controllerClass)) {
            throw new \Exception("$controllerClass already exists!!");
        }

        /*write operation ->*/
        $filePointer = fopen($controllerClass, 'w') or die('Unable to generate controller');

        $controllerContent = $this->getControllerTemplate();
        $content = $this->getIndexStub();
        $content = $this->replaceTemplate('{%methods%}', $content, $controllerContent);

        return $this->writeContentToClass($filePointer, $content);
    }
251641
protected function getControllers()
	{
		if( $this->controllers === [] )
		{
			$subFolder = substr( str_replace( '\\', DIRECTORY_SEPARATOR, $this->getClassPrefix() ), 7 );

			foreach( $this->cntlPaths as $path => $list )
			{
				foreach( $list as $relpath )
				{
					$path .= DIRECTORY_SEPARATOR . $relpath . DIRECTORY_SEPARATOR . $subFolder;

					if( is_dir( $path ) ) {
						$this->addControllers( new \DirectoryIterator( $path ) );
					}
				}
			}
		}

		return $this->controllers;
	}
370693
public function getController()
    {
        if ($controllerData = $this->component->getData('_controller')) {
            return $controllerData;
        }

        return $this->variation->getConfiguration(
            'components',
            $this->component->getComponentType()->getName(),
            'controller',
            $this->component->getComponentType()->getController()
        );
    }