Synchronously lookup the controller instance for the specified sidNav instance which has been
registered with the markup `md-component-id`
357180
function findInstance(handle, shouldWait) {
    var instance = $mdComponentRegistry.get(handle);

    if (!instance && !shouldWait) {
      // Report missing instance
      $log.error($mdUtil.supplant(errorMsg, [handle || ""]));

      // The component has not registered itself... most like NOT yet created
      // return null to indicate that the Sidenav is not in the DOM
      return undefined;
    }
    return instance;
  }
600389
def get_component(id):
    
    components = cachet.Components(endpoint=ENDPOINT)
    component = json.loads(components.get(id=id))
    return component['data']
229243
def get_instance(self, payload):
        
        return BindingInstance(self._version, payload, service_sid=self._solution['service_sid'], )
522377
def horizon_main_nav(context):
    """"""
    if 'request' not in context:
        return {}
    current_dashboard = context['request'].horizon.get('dashboard', None)
    dashboards = []
    for dash in Horizon.get_dashboards():
        if dash.can_access(context):
            if callable(dash.nav) and dash.nav(context):
                dashboards.append(dash)
            elif dash.nav:
                dashboards.append(dash)
    return {'components': dashboards,
            'user': context['request'].user,
            'current': current_dashboard,
            'request': context['request']}
557880
def get_descriptor_by_id(self, id, is_master_id=None):
        
        route_values = {}
        if id is not None:
            route_values['id'] = self._serialize.url('id', id, 'str')
        query_parameters = {}
        if is_master_id is not None:
            query_parameters['isMasterId'] = self._serialize.query('is_master_id', is_master_id, 'bool')
        response = self._send(http_method='GET',
                              location_id='a230389a-94f2-496c-839f-c929787496dd',
                              version='5.0-preview.1',
                              route_values=route_values,
                              query_parameters=query_parameters)
        return self._deserialize('str', response)
606214
private void registerControllerMethods(Map<Method, Class<? extends Annotation>> discoveredMethods) {

        Collection<Method> methods = sortMethods(discoveredMethods.keySet());

        Map<Class<? extends Controller>, Set<String>> controllers = new HashMap<>();
        for (Method method : methods) {
            Class<? extends Controller> controllerClass = (Class<? extends Controller>) method.getDeclaringClass();
            if (!controllers.containsKey(controllerClass)) {
                Set<String> paths = collectPaths(controllerClass);
                controllers.put(controllerClass, paths);
            }

            Class<? extends Annotation> httpMethodAnnotationClass = discoveredMethods.get(method);
            Annotation httpMethodAnnotation = method.getAnnotation(httpMethodAnnotationClass);

            String httpMethod = httpMethodAnnotation.annotationType().getAnnotation(HttpMethod.class).value();
            String[] methodPaths = ClassUtil.executeDeclaredMethod(httpMethodAnnotation, "value");

            Set<String> controllerPaths = controllers.get(controllerClass);
            if (controllerPaths.isEmpty()) {
                // add an empty string to allow controllerPaths iteration
                controllerPaths.add("");
            }

            for (String controllerPath : controllerPaths) {

                if (methodPaths.length == 0) {
                    // method does not specify a path, inherit from controller
                    String fullPath = StringUtils.addStart(StringUtils.removeEnd(controllerPath, "/"), "/");
                    ControllerHandler handler = new ControllerHandler(injector, controllerClass, method.getName());
                    handler.validateMethodArgs(fullPath);

                    RouteRegistration registration = new RouteRegistration(httpMethod, fullPath, handler);
                    configureRegistration(registration, method);
                    routeRegistrations.add(registration);
                } else {
                    // method specifies one or more paths, concatenate with controller paths
                    for (String methodPath : methodPaths) {
                        String path = Joiner.on("/").skipNulls().join(StringUtils.removeEnd(controllerPath, "/"), StringUtils.removeStart(methodPath, "/"));
                        String fullPath = StringUtils.addStart(StringUtils.removeEnd(path, "/"), "/");

                        ControllerHandler handler = new ControllerHandler(injector, controllerClass, method.getName());
                        handler.validateMethodArgs(fullPath);

                        RouteRegistration registration = new RouteRegistration(httpMethod, fullPath, handler);
                        configureRegistration(registration, method);
                        routeRegistrations.add(registration);
                    }
                }

            }

        }
    }
1366254
static function getController($module_name,$controller_name,$request,$view) {
        static $ctrls = NULL;
        $module_name  = strtolower($module_name);
        $controller_name = strtolower($controller_name);
        if (!$ctrls[$module_name][$controller_name]) {
            $controller = ucfirst($controller_name) . 'Controller';
            $controller_class = '\\' . self::getName() . '\\Controller\\' . ucfirst($module_name) . '\\' . $controller;
            if (!class_exists($controller_class)) {
                throw new Controller\NoControllerException;
            }
            $c = new $controller_class($request,$view);
            $ctrls[$module_name][$controller_name] = $c;
        }
        return $ctrls[$module_name][$controller_name];
    }
904568
@Nullable
    public Controller getControllerWithInstanceId(@NonNull String instanceId) {
        for (RouterTransaction transaction : backstack) {
            Controller controllerWithId = transaction.controller.findController(instanceId);
            if (controllerWithId != null) {
                return controllerWithId;
            }
        }
        return null;
    }
172480
public function checkNavigator()
    {
        // can we find th' darned controller?
        if (!$this->checkControllerExists()) {
            $this->setNotFound();
            return;
        }

        // merge the feckin params
        if (array_key_exists('params', $this->config) && is_array($this->config['params']) ) {
            $merged = array_merge($this->config['params'], $this->request->getQueryParams());
            $this->request = $this->request->withQueryParams($merged);
        }

        // create the controller
        $this->controller = new $this->config['controller_name']($this->request);
        $this->controller->setServerEnvironment($this->getEnv());

        // where's the bloody action?
        if (!$this->checkActionExists()) {
            $this->setNotFound();
        }
        return null;
    }
285802
def get_dashboard(self, id, **kwargs):
        "
        resp = self._get_object_by_name(self._DASHBOARD_ENDPOINT_SUFFIX, id,
                                        **kwargs)
        return resp
564289
def get_instance(self, payload):
        
        return SyncListInstance(self._version, payload, service_sid=self._solution['service_sid'], )
1019154
function ToggleComponentController($scope, $element, $attrs, $q, $mdComponentRegistry) {
    var self = this;

    // Use Default internal method until overridden by directive postLink

    self.toggleOpen = function () {
      return $q.when($scope.isOpen);
    };

    self.isOpen = function () {
      return !!$scope.isOpen;
    };

    self.open = function () {
      return self.$toggleOpen(true);
    };

    self.close = function () {
      return self.$toggleOpen(false);
    };

    self.toggle = function () {
      return self.$toggleOpen(!$scope.isOpen);
    };

    self.destroy = $mdComponentRegistry.register(self, $attrs.mdComponentId);
  }
1305157
function(req, res, next) {
			req.controller = controllerName;
			req.action = actionName || 'index';
			next();
		}
600269
def find_template_with_lookup(name, prefix = nil, partial = false)
      if prefix == controller_path
        folder = controller.find_inheritable_template_folder(name, partial)
        prefix = folder if folder
      end
      find_template_without_lookup(name, prefix, partial)
    end
244397
private GVRCursorController getUniqueControllerId(int deviceId) {
        GVRCursorController controller = controllerIds.get(deviceId);
        if (controller != null) {
            return controller;
        }
        return null;
    }
1291892
def getDataHandler(self, measurementId, deviceId):
        
        am = next((m for m in self.activeMeasurements if m.id == measurementId), None)
        if am is None:
            return None, None
        else:
            device = self.deviceController.getDevice(deviceId)
            if device is None:
                return None, None
            else:
                return am, device.dataHandler
736881
function byIdRef(id, ref) {
      var cmp = this.byId(id).lookupReferenceHolder(false).lookupReference(ref);
      if (!cmp) {
        throw new Error('Component not found for container id: ' + id + ', reference: ' + ref);
      }
      return cmp;
    }