Generates the controller class only.
976236
private function generateControllerClass()
    {
        $dir = $this->bundle->getPath();

        $parts = explode('\\', $this->document);
        $class = array_pop($parts);

        $namespace = implode('\\', $parts);

        $target = sprintf(
            '%s/Controller/%s/%sController.php',
            $dir,
            str_replace('\\', '/', $namespace),
            $class
        );

        if (file_exists($target)) {
            throw new \RuntimeException('Unable to generate the controller as it already exists.');
        }

        $this->renderFile('controller.php.twig', $target, array(
            'actions' => $this->actions,
            'route_prefix' => $this->routePrefix,
            'route_name_prefix' => $this->routeNamePrefix,
            'dir' => $this->skeletonDir,
            'bundle' => $this->bundle->getName(),
            'document' => $this->document,
            'document_class' => $class,
            'namespace' => $this->bundle->getNamespace(),
            'controller_namespace' => $namespace,
            'format' => $this->format,
        ));
    }
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];
        }
    }
1016705
public function constructClasses() {
		$timer = 'controllerConstructClasses';
		Common::startTimer($timer, __d('common', "Event: Controller.constructClasses"));

		$properties = array('components', 'helpers');
		$result = $this->triggerEvent('Controller.constructClasses', $this);

		$this->_mergeControllerVars();
		foreach ($properties as $property) {
			if (!isset($result[$property])) {
				continue;
			}
			$this->{$property} = Hash::merge(
				Hash::normalize($result[$property]),
				Hash::normalize((array) $this->{$property})
			);
			unset($result[$property]);
		}

		$this->_set($result);
		Common::stopTimer($timer);
		parent::constructClasses();
	}
792316
public function getController()
    {
        if ($this->controller) {
            return $this->controller;
        }

        $controllerClass = null;
        foreach (array_reverse(ClassInfo::ancestry($this->getClassName())) as $sliceClass) {
            $controllerClass = "{$sliceClass}_Controller";
            if (class_exists($controllerClass)) {
                break;
            }

            $controllerClass = "{$sliceClass}Controller";
            if (class_exists($controllerClass)) {
                break;
            }
        }

        if (!class_exists($controllerClass)) {
            throw new Exception("Could not find controller class for {$this->getClassName()}");
        }

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

        return $this->controller;
    }
497070
protected function controllerMiddleware()
	{
		list( $class, $method ) = explode( '@', $this->action['uses'] );

		$controller = UniversalBuilder::resolve( $class );

		return ( new ControllerDispatcher( $this->router ) )->getMiddleware( $controller, $method );
	}
950173
protected AbstractDraweeController buildController() {
    if (FrescoSystrace.isTracing()) {
      FrescoSystrace.beginSection("AbstractDraweeControllerBuilder#buildController");
    }
    AbstractDraweeController controller = obtainController();
    controller.setRetainImageOnFailure(getRetainImageOnFailure());
    controller.setContentDescription(getContentDescription());
    controller.setControllerViewportVisibilityListener(getControllerViewportVisibilityListener());
    maybeBuildAndSetRetryManager(controller);
    maybeAttachListeners(controller);
    if (FrescoSystrace.isTracing()) {
      FrescoSystrace.endSection();
    }
    return controller;
  }
572783
public function generateController()
    {
        if (!$this->confirm('Do you want to generate a controller?')) {
            return;
        }

        $this->console->call('generate:controller', [
            'name' => $this->getControllerName(),
            '--force' => $this->console->option('force'),
            '--scaffold' => true,
        ]);
    }
757173
private function getControllerClassName() : string
    {
        $tableName = App::shortName(get_class($this->table), 'Model/Table', 'Table');

        return (string)App::className($tableName . 'Controller', 'Controller');
    }
1217798
public String getController() {
        final StringBuilder controller = new StringBuilder();
        if (getProtocol() != null) {
            controller.append(getProtocol()).append("://");
        }
        if (getHost() != null) {
            controller.append(getHost());
        } else {
            controller.append("localhost");
        }
        if (getPort() > 0) {
            controller.append(':').append(getPort());
        }
        return controller.toString();
    }
261464
public <C extends Controller> AbstractModule controller(Class<C> klass) {
        String name = klass.getName();
        JSClosure constructor = JSClosure.create(new DefaultControllerConstructor<C>(name, klass));
        ControllerDependencyInspector inspector = GWT.create(ControllerDependencyInspector.class);
        JSArray<String> dependencies = JSArray.create(inspector.inspect(klass));
        dependencies.unshift("$scope");
        ngo.controller(name, dependencies, constructor);
        return this;
    }
678823
public synchronized Class<?> getControllerClassForName(String name) {
        Assert.requireNonBlank(name, "name");
        Class<?> foundClass = controllersClasses.get(name);
        if(foundClass == null) {
            throw new IllegalArgumentException("Can't find controller type with name " + name);
        }
        return foundClass;
    }
837256
def generate(*args)
      init_vars(options)

      controller = args.shift
      actions = args

      if controller
        sanitize(controller, actions, options)
      else
        puts "Please provide a controller name."
        exit
      end
    end
245467
def controller(self):
        

        if hasattr(self, 'controller_id'):
            if len(self.controller_info['controllers']) > 1:
                raise TypeError(
                    'Only one controller per account is supported.'
                )
            return self.controller_id
        raise AttributeError('No controllers assigned to this account.')
734398
private function getController()
    {
        if (empty($this->controllerName)) {
            return null;
        }

        if (isset($this->controller)) {
            return $this->controller;
        }

        $this->controller = $this->createControllerFromClassName($this->controllerName);

        return $this->controller;
    }
630271
final protected function getPagesControllerClassName()
    {
        $modules = modules()->getArrayCopy();

        foreach($modules as $module) {
            $controllerClassName = $module->getNamespace() . 'Controllers\Pages';
            if ($module->getNamespace() === 'O2System\Framework\\') {
                $controllerClassName = 'O2System\Framework\Http\Controllers\Pages';
            }

            if(class_exists($controllerClassName)) {
                return $controllerClassName;
                break;
            }
        }

        if(class_exists('O2System\Framework\Http\Controllers\Pages')) {
            return 'O2System\Framework\Http\Controllers\Pages';
        }

        return false;
    }
1279209
@SuppressWarnings("unchecked")
    protected C buildController() throws CoreException {

        // Build the controller by reflection excluding NullController
        return (C) ClassUtility.findAndBuildGenericType(this.getClass(), Controller.class, NullController.class, this);
    }
824795
def get_class(self, module, class_name):
        """"""
        # let's get the class
        class_object = getattr(module, class_name, None)
        if not class_object or not issubclass(class_object, Controller):
            class_object = None

        return class_object