@function Controller
@param {String} [name] - The name of the controller.

@example
[@]Controller()
class MyController {}
761597
function Controller(name, options) {
	if (typeof name === "function") {
		var _constructor = name;name = null;
		return register(_constructor, options);
	}

	return register;
	function register(constructor, opts) {
		registerLock(constructor);
		var meta = (0, _utils.funcMeta)(constructor);

		name = name || opts && opts.name || meta.name;
		meta.controller.name = name;

		_app.app.controller(name, constructor);
	}
}
549503
public static void setControllerName(String name) {
		Map<String, Object> sessionMap = FacesContext.getCurrentInstance().getExternalContext().getSessionMap();
		sessionMap.put(DART_CONTROLLER_NAME, name);
	}
496963
def controller
      unless params[:controller]
        raise ControllerExceptions::NotFound,
          "Route matched, but route did not specify a controller.\n" +
          "Did you forgot to add :controller => \"people\" or :controller " +
          "segment to route definition?\nHere is what's specified:\n" +
          route.inspect
      end
      path = [params[:namespace], params[:controller]].compact.join(Merb::Const::SLASH)
      controller = path.snake_case.to_const_string

      begin
        Object.full_const_get(controller)
      rescue NameError => e
        msg = "Controller class not found for controller `#{path}'"
        Merb.logger.warn!(msg)
        raise ControllerExceptions::NotFound, msg
      end
    end
648325
def controller_name(cls, _remove_suffixes=None) -> str:
    
    name = cls if isinstance(cls, str) else cls.__name__
    remove_suffixes = _remove_suffixes or getattr(cls, REMOVE_SUFFIXES_ATTR)
    for suffix in remove_suffixes:
        if name.endswith(suffix):
            name = right_replace(name, suffix, '')
            break
    return snake_case(name)
932561
public void withControllerClass(Class<?> clazz) {
        Objects.requireNonNull(clazz, Required.CONTROLLER_CLASS.toString());
        this.controllerClass = clazz;
    }
84485
function(name, action) {
        var handlers = this.__handlers__;

        if (! handlers ||
            ! handlers[name]) {
            return false;
        }
        var hdls = handlers[name];
        for (var i = 0; i < hdls.length; i++) {
            if (hdls[i].action === action) {
                return true;
            }
        }
    }
233382
public function controllerClassNameStrategy($name)
    {
        $names = explode('_', $name);
        $names = array_map('ucfirst', $names);
        return join('\\', $names) . 'Controller';
    }
530901
function Module( type, name, dir){
  this.name = name;
  this.type = type;
  
  
  var _modulePath  = format('%s/%s', dir, type)
    , _view         = format('%s/%s.%s', _modulePath, 'html', 'hbs')
    , _model        = format('%s/%s.%s', _modulePath, type, 'peb')
    , _controller   = format('%s/%s.%s', _modulePath, type, 'js')
  ;
  
  
  /**
   * Load view 
   */
  this.loadView( _view);
  

  /**
   * Load model 
   */
  this.loadModel( _model);
  

  /**
   * Load controller 
   */
  if( !this.loadController( _controller) 
  &&  !this.view){
    console.error( 'unable to load module `%s` with name `%s` from `%s`', type, name, _modulePath);
  }
  
  
  /**
   *
   */
  if( this.controller){
    if( this.controller.helpers){
      
    }
  }
  
  return this;
}
24254
function (p) {
                var parent = ariaHtmlControllersSuggestions.prototype;
                for (var key in parent) {
                    if (parent.hasOwnProperty(key) && !p.hasOwnProperty(key)) {
                        p[key] = parent[key];
                    }
                }
            }
72120
function Policy(name, Transport, options) {
  var policy = this;

  if ('string' !== typeof name) {
    options = Transport;
    Transport = name;
    name = undefined;
  }

  if ('function' !== typeof Transport) {
    throw new Error('Transport should be a constructor.');
  }

  policy.name = (name || Transport.prototype.name).toLowerCase();
  policy.Transport = Transport;
  policy.options = options || {};
  policy.id = 0;
}
1089765
public function controller($controller_name)
    {
        // Retrieving the class and method to launch.
        if (is_null($controller_name)) {
            return null;
        }

        $parts = preg_split('/::|@/', $controller_name);

        if (count($parts) == 1) {
            $parts[1] = '__invoke';
        }

        list($class, $method) = $parts;

        if (!class_exists($class, true)) {
            $class = sprintf('%s\\%s', $this->namespaces['controller'], ucfirst($class));
        }

        $injections = $this->injector($class, $method);

        return [
            'action' => [new $class(), $method],
            'injection' => $injections
        ];
    }
136299
def build
      controller_name = @klass.name.gsub(/Controller$/, '').underscore
      Rails.application.routes.routes.each_with_object({}) do |route, comments|
        if route.defaults[:controller] == controller_name
          verb_match = route.verb.to_s.match(/\^(.*)\$/)
          verbs = verb_match.nil? ? '*' : verb_match[1]
          (comments[route.defaults[:action]] ||= []) << "#{verbs} #{route.ast}"
        end
      end
    end
1135691
def instance():
        

        if not hasattr(Controller, '_instance') or Controller._instance is None:
            Controller._instance = Controller()
        return Controller._instance
1305157
function(req, res, next) {
			req.controller = controllerName;
			req.action = actionName || 'index';
			next();
		}
909622
function(callback) {

            try {
                var controller = require(path);
                callback(null, controller);
            } catch (e) {
                return callback(e);
            }
        }
1144751
public function parseControllerName($name)
	{
		if (strpos($name, ':') === false) {
			throw new \Exception(sprintf('Unparsable controller name "%s", it should have at least one ":"', $name));
		}

		$parts = explode(':', $name);

		if (count($parts) == 2) {
			list($class, $action) = $parts;

			$action = $action.'Action';

			if (!class_exists($class)) {
				throw new \Exception(sprintf('Controller class "%s" not found', $class));
			}

			if (!method_exists($class, $action)) {
				throw new \Exception(sprintf('Controller method "%s" does not exist for controller class "%s"', $action, $class));
			}

			return array(
				'controller' => $class,
				'action' => $action
			);
		}

		if (count($parts) == 3) {
			list($package, $controller, $action) = $parts;

			$action = $action.'Action';

			$packageName = $this->resolvePackage($package);

			$parts = explode('\\', $packageName);

			array_pop($parts);

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

			return array(
				'controller' => '\\'.$namespace.'\\Controller\\'.$controller.'Controller',
				'action' => $action
			);
		}

		throw new \Exception(sprintf('Too many chunks in your controller name (got "%s")', implode(', ', $parts)));
	}
829222
function (name) {
		var elem = this.createElement('g');
		return defined(name) ? elem.attr({ 'class': PREFIX + name }) : elem;
	}