Mount all controllers
513523
public function bindRoutes()
    {
        $loader = new RouteLoader();

        $loader->registerProviders(RouteLoader::$defaultProviders);

        $loader->bindRoutes($this);
        $this->bindPluginRoutes('plugin.controller_providers.root');
    }
812408
def with_mounts(*args, uchroot_cmd_fn=no_args, **kwargs):
    """"""
    mounts = CFG["container"]["mounts"].value
    prefixes = CFG["container"]["prefixes"].value

    uchroot_opts, mounts = __mounts__("mnt", mounts)
    uchroot_cmd = uchroot_cmd_fn(**kwargs)
    uchroot_cmd = uchroot_cmd[uchroot_opts]
    uchroot_cmd = uchroot_cmd[args]
    paths, libs = env(mounts)
    prefix_paths, prefix_libs = env(prefixes)

    uchroot_cmd = run.with_env_recursive(
        uchroot_cmd,
        LD_LIBRARY_PATH=path.list_to_path(libs + prefix_libs),
        PATH=path.list_to_path(paths + prefix_paths))
    return uchroot_cmd
407311
public function getControllerDirectories()
    {
        $dirs = [];
        $controller_ns = $this->config('controller.namespaces');
        foreach ($this->config('directory.apps') as $dir) {
            if (in_array($dir['namespace'], $controller_ns)) $dirs[] = $dir['dir'] . DS . 'Controller';
        }
        return $dirs;
    }
346298
function () {
    var data = this.data;
    var controllerIndex = data.hand === 'right' ? 0 : data.hand === 'left' ? 1 : 2;
    checkControllerPresentAndSetup(this, GAMEPAD_ID_PREFIX, {index: controllerIndex});
  }
818819
public void initializeAll(I_CmsSitemapController controller) {

        initialize(controller);
        for (CmsClientSitemapEntry child : m_subEntries) {
            child.initializeAll(controller);
        }
    }
25980
def controller_dirs
			parts = @controller.class.underscore.split('/').map do |part|
				%w[_controller _ctrl]
					.find { |suffix| part.chomp! suffix }
				part
				## Alternative, but slower by ~50%:
				# part.sub(/_(controller|ctrl)$/, '')
			end
			combine_parts(parts).map! { |path| path.join('/') }
		end
995545
def drawControllers(self):
        ""
        # don't draw controllers if somebody else has input focus
        if self.m_pHMD.isInputFocusCapturedByAnotherProcess():
            return
        vertdataarray = list()
        self.m_uiControllerVertcount = 0
        self.m_iTrackedControllerCount = 0
    
        for unTrackedDevice in range(openvr.k_unTrackedDeviceIndex_Hmd + 1, openvr.k_unMaxTrackedDeviceCount):
            if not self.m_pHMD.isTrackedDeviceConnected( unTrackedDevice ):
                continue
            if self.m_pHMD.getTrackedDeviceClass( unTrackedDevice ) != openvr.TrackedDeviceClass_Controller:
                continue
            self.m_iTrackedControllerCount += 1
            if not self.m_rTrackedDevicePose[ unTrackedDevice ].bPoseIsValid:
                continue
            mat = self.m_rmat4DevicePose[unTrackedDevice]
            center = mat * Vector4( 0, 0, 0, 1 )
            for i in range(3):
                color = Vector4( 0, 0, 0 )
                point = Vector4( 0, 0, 0, 1 )
                point[i] += 0.05  # offset in X, Y, Z
                color[i] = 1.0  # R, G, B
                point = mat * point
                vertdataarray.append( center.x )
                vertdataarray.append( center.y )
                vertdataarray.append( center.z )
                vertdataarray.append( color.x )
                vertdataarray.append( color.y )
                vertdataarray.append( color.z )
                vertdataarray.append( point.x )
                vertdataarray.append( point.y )
                vertdataarray.append( point.z )
                vertdataarray.append( color.x )
                vertdataarray.append( color.y )
                vertdataarray.append( color.z )
                self.m_uiControllerVertcount += 2
            start = mat * Vector4( 0, 0, -0.02, 1 )
            end = mat * Vector4( 0, 0, -39., 1 )
            color = Vector3( .92, .92, .71 )
            vertdataarray.append( start.x )
            vertdataarray.append( start.y )
            vertdataarray.append( start.z )
            vertdataarray.append( color.x )
            vertdataarray.append( color.y )
            vertdataarray.append( color.z )
            vertdataarray.append( end.x )
            vertdataarray.append( end.y )
            vertdataarray.append( end.z )
            vertdataarray.append( color.x )
            vertdataarray.append( color.y )
            vertdataarray.append( color.z )
            self.m_uiControllerVertcount += 2
        # Setup the VAO the first time through.
        if self.m_unControllerVAO == 0:        
            self.m_unControllerVAO = glGenVertexArrays(1)
            glBindVertexArray( self.m_unControllerVAO )
            self.m_glControllerVertBuffer = glGenBuffers(1)
            glBindBuffer( GL_ARRAY_BUFFER, self.m_glControllerVertBuffer )
            stride = 2 * 3 * sizeof( ctypes.c_float )
            offset = 0
            glEnableVertexAttribArray( 0 )
            glVertexAttribPointer( 0, 3, GL_FLOAT, False, stride, offset)
            offset += sizeof( Vector3 )
            glEnableVertexAttribArray( 1 )
            glVertexAttribPointer( 1, 3, GL_FLOAT, False, stride, offset)
            glBindVertexArray( 0 )
        glBindBuffer( GL_ARRAY_BUFFER, self.m_glControllerVertBuffer )
        # set vertex data if we have some
        if len(vertdataarray) > 0:
            #$ TODO: Use glBufferSubData for this...
            glBufferData( GL_ARRAY_BUFFER, sizeof(float) * vertdataarray.size(), vertdataarray[0], GL_STREAM_DRAW )
318260
final public function onMountRoutes(MountEvent $event)
    {
        $app = $this->getContainer();

        $collection = $app['controllers_factory'];
        if ($collection instanceof DefaultControllerClassAwareInterface) {
            $collection->setDefaultControllerClass($this);
        }
        $this->registerFrontendRoutes($collection);
        $event->mount('/', $collection);

        $collection = $app['controllers_factory'];
        if ($collection instanceof DefaultControllerClassAwareInterface) {
            $collection->setDefaultControllerClass($this);
        }
        $this->registerBackendRoutes($collection);
        $event->mount($app['controller.backend.mount_prefix'], $collection);
    }
207654
public function findController ($controller = NULL, $captureall = TRUE)
	{

		/**
		 *
		 * Try the following route conversions:
		 *
		 * Controller/Action	-> Controller->action
		 * Controller/Action	-> Action->index
		 * Controller/Action	-> Controller\Index->action
		 * Controller/Action	-> Controller\Index->captureall
		 * Controller/Action	-> Controller->captureall
		 * Controller/Action	-> Action->captureall
		 * Controller/Action	-> Action\Index->index
		 * Controller/Action	-> Action\Index->captureall
		 *
		 */

		// Append route controller to the controller class if there is one

		$controller	.= $this->controller? '\\' . $this->controller : NULL;

		// Try controller with action
		// e.g. /admin/login -> \Sonic\Controller\Admin->login ()

		if (class_exists ($controller) &&
			method_exists ($controller, $this->action) &&
			static::isInstantiable ($controller))
		{
			$this->controller	= $controller;
			return TRUE;
		}

		// Try action as controller with index action
		// e.g. /admin -> \Sonic\Controller\Admin->index ()

		elseif (class_exists ($controller . '\\' . ucfirst ($this->action)) &&
			method_exists ($controller . '\\' . ucfirst ($this->action), 'index') &&
			static::isInstantiable ($controller . '\\' . ucfirst ($this->action)))
		{
			$this->controller	= $controller . '\\' . ucfirst ($this->action);
			$this->action		= 'index';
			return TRUE;
		}

		// Try index controller

		elseif (class_exists ($controller . '\\Index') &&
			static::isInstantiable ($controller . '\\Index'))
		{

			// Try action on index controller
			// e.g. /admin -> \Sonic\Controller\Index->admin ()

			if (method_exists ($controller . '\\Index', $this->action))
			{
				$this->controller	= $controller . '\\Index';
				return TRUE;
			}

			// Try capture all on index controller
			// e.g. /admin -> \Sonic\Controller\Index->captureall ()

			else if (method_exists ($controller . '\\Index', 'captureall'))
			{
				$this->controller	= $controller . '\\Index';
				$this->action		= 'captureall';
				return TRUE;
			}

		}

		// Try capture all on the controller
		// e.g. /admin/login -> \Sonic\Controller\Admin->captureall ()

		if ($captureall &&
			class_exists ($controller) &&
			method_exists ($controller, 'captureall') &&
			static::isInstantiable ($controller))
		{
			$this->controller	= $controller;
			$this->action		= 'captureall';
			return TRUE;
		}

		// Try action as controller with captureall action
		// e.g. /admin -> \Sonic\Controller\Admin->captureall ()

		elseif ($captureall &&
			class_exists ($controller . '\\' . ucfirst ($this->action)) &&
			method_exists ($controller . '\\' . ucfirst ($this->action), 'captureall') &&
			static::isInstantiable ($controller . '\\' . ucfirst ($this->action)))
		{
			$this->controller	= $controller . '\\' . ucfirst ($this->action);
			$this->action		= 'captureall';
			return TRUE;
		}

		// Try Action\Index as the controller with index action
		// e.g. /admin -> \Sonic\Controller\Admin\Index->index ()

		elseif (class_exists ($controller . '\\' . ucfirst ($this->action) . '\\Index') &&
			method_exists ($controller . '\\' . ucfirst ($this->action) . '\\Index', 'index') &&
			static::isInstantiable ($controller . '\\' . ucfirst ($this->action) . '\\Index'))
		{
			$this->controller	= $controller . '\\' . ucfirst ($this->action) . '\\Index';
			$this->action		= 'index';
			return TRUE;
		}

		// Try Action\Index as the controller with captureall action
		// e.g. /admin -> \Sonic\Controller\Admin\Index->captureall ()

		elseif ($captureall &&
			class_exists ($controller . '\\' . ucfirst ($this->action) . '\\Index') &&
			method_exists ($controller . '\\' . ucfirst ($this->action) . '\\Index', 'captureall') &&
			static::isInstantiable ($controller . '\\' . ucfirst ($this->action) . '\\Index'))
		{
			$this->controller	= $controller . '\\' . ucfirst ($this->action) . '\\Index';
			$this->action		= 'captureall';
			return TRUE;
		}

		// No match

		return FALSE;

	}
96998
def mount(device, mountpoint, options=None, persist=False, filesystem="ext3"):
    """"""
    cmd_args = ['mount']
    if options is not None:
        cmd_args.extend(['-o', options])
    cmd_args.extend([device, mountpoint])
    try:
        subprocess.check_output(cmd_args)
    except subprocess.CalledProcessError as e:
        log('Error mounting {} at {}\n{}'.format(device, mountpoint, e.output))
        return False

    if persist:
        return fstab_add(device, mountpoint, filesystem, options=options)
    return True
469758
public function load_controllers($root, $folder = null)
    {
        $current = $root . ($folder ? '/' . $folder : '');
        if (is_dir($current)) {
            $files = scandir($current);
            foreach ($files as $file) {
                if ($file != '.' && $file != '..') {
                    $filename = $current . '/' . $file;
                    $name = $folder . '/' . $file;
                    $ext = substr($file, strrpos($file, '.'));
                    if ($ext == '.php') {
                        if(($class = $this->preCache($filename)) === false) {
                            $class = file_get_php_classes($filename);
                            $this->postCache($filename, $class);
                        }
                        if(count($class) != 0) {
                            $this->controllers[$class[0]] = $folder . '/' . $file;
                            $this->controllers_map[$class[0]] = $root . '/' . $folder . '/' . $file;
                        } else {
                            Log::w($filename . " is not a valid controller!");
                        }
                    } elseif (is_dir($filename)) {
                        $this->load_controllers($root, $name);
                    }
                }
            }
        }
    }
977011
def mount(self):
        """"""
        if not self.is_mounted():
            # OS X mounting is handled automagically in /Volumes:
            # DO NOT mkdir there!
            # For Linux, ensure the mountpoint exists.
            if not is_osx():
                if not os.path.exists(self.connection["mount_point"]):
                    os.mkdir(self.connection["mount_point"])
            self._mount()
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;
	}
627993
def controllers(self):
        
        controllers = []
        try:
            while True:
                controller = self.lib.tdController()
                del controller["name"]
                del controller["available"]
                controllers.append(Controller(lib=self.lib, **controller))
        except TelldusError as e:
            if e.error != const.TELLSTICK_ERROR_NOT_FOUND:
                raise
        return controllers
1198970
protected function _includeAppController(): void
    {
        $controller = null;
        if (file_exists(WWW_ROOT . 'js/app/app_controller.js')) {
            $controller = 'app/app_controller.js';
        } else {
            $controller = '/frontend_bridge/js/lib/app_controller.js';
        }
        $this->_dependencies[] = $controller;
    }
247966
public function actionAllCmd()
    {
        /**
         * @var $controllerHelp HelpController
         */
        $controllerHelp = \Yii::$app->createController('help')[0];
        $commands = $controllerHelp->getCommands();

        foreach ($controllerHelp->getCommands() as $controller) {
            $subController = \Yii::$app->createController($controller)[0];
            $actions = $controllerHelp->getActions($subController);

            if ($actions) {
                foreach ($actions as $actionId) {
                    $commands[] = $controller . "/" . $actionId;
                }
            }
        };

        $this->stdout(implode("\n", $commands));
    }
599748
def _get_controllers(self):
        
        controllers = dict()
        for pkg in pkg_resources.iter_entry_points(group=self.CONTROLLERS):
            LOGGER.debug('Loading %s controller', pkg.name)
            controllers[pkg.name] = importlib.import_module(pkg.module_name)
        return controllers