Register routes in system.

@param string $file Path to file with routes. (Full path)
@param string $namespace Namespace to controllers for execute actions
@return void
193950
protected function routesRegister(string $file, string $namespace)
    {
        $this->app->router->group([
            'namespace' => $namespace,
        ], function ($router) use ($file) {
            require $file;
        });
    }
333475
public function registerNamespace($namespace, $directory)
    {
        $namespace = rtrim($namespace, self::NS_SEPARATOR). self::NS_SEPARATOR;
        $this->namespaces[$namespace] = $this->normalizeDirectory($directory);
        return $this;
    }
916486
public function loadAliasesFrom($path, $namespace, $key = 'aliases')
    {
        // Get the alias loader
        $loader = Loader::getInstance();

        // Prepare key for config line
        $key = ! is_null($key) ? '.' . $key : null;

        // Wrapped in a try catch because Finder squawks when there is no directory
        try{

            // Load the namespaced config files
            $files = Finder::create()->files()->name('*.php')->in($path);
            foreach($files as $file)
            {
                // Construct the config line where aliases are defined
                $filename = basename($file->getRealPath(), '.php');
                $line = $namespace . '::' . $filename . $key;

                // Load each of the aliases
                $aliases = config($line, []);
                foreach( $aliases as $alias => $class)
                {
                    $loader->alias($alias, $class);
                }
            }

        // Silently ignore Finder exceptions
        } catch( InvalidArgumentException $e){}
    }
1031562
protected function loadViewsFrom($path, $namespace)
    {
        if (is_dir($appPath = $this->app->resourcePath().'/views/vendor/'.$namespace)) {
            $this->app['view']->addNamespace($namespace, $appPath);
        }

        $this->app['view']->addNamespace($namespace, $path);
    }
411264
private function addNamespacePaths(& $list, $namespace, $paths)
    {
        $namespace = $namespace === '' ? '' : trim($namespace, '\\') . '\\';

        if (!isset($list[$namespace])) {
            $list[$namespace] = [];
        }

        if (is_array($paths)) {
            $list[$namespace] = array_merge($list[$namespace], $paths);
        } else {
            $list[$namespace][] = $paths;
        }
    }
103165
public function addPath($path, $namespace = null)
    {
        $key = (is_null($namespace)) ? $path : $namespace . '::' . $path;

        $this->fullQualifiedPathNameWithTemplatePath[$key] = new TemplatePath($path, $namespace);
    }
1237685
protected function loadViewsFrom($path, $namespace)
	{
		if (is_dir($appPath = $this->app->basePath() . '/resources/views/vendor/' . $namespace))
		{
			$this->app['view']->addNamespace($namespace, $appPath);
		}

		$this->app['view']->addNamespace($namespace, $path);
	}
1147959
protected function registerRoutes (Router $router)
    {
        $filePath = $this->homeDirectory . '/../../app/honeycomb/routes.php';

        if( file_exists($filePath) ) {
            if (! $this->app->routesAreCached()) {
                $router->group([
                    'namespace'  => $this->namespace,
                ], function (Router $router) use ($filePath) {
                    require $filePath;
                });
            }
        }
    }
1348595
public static function registerNamespace($namespace, $prepend = false)
    {
        if (false === $prepend) {
            self::$namespaces[] = $namespace;
        } else {
            array_unshift(self::$namespaces, $namespace);
        }
    }
556176
protected function loadViewsFrom($path, $namespace)
    {
        if (is_dir($appPath = resource_path('views/vendor/' . $namespace))) {
            $this->container['view']->addNamespace($namespace, $appPath);
        }

        $this->container['view']->addNamespace($namespace, $path);
    }
816976
protected function loadFrontendRoutesFrom(string $path, ?string $namespace = '', array $attributes = []): void
    {
        $foundation = $this->app->make('orchestra.app');
        $attributes = $this->resolveRouteGroupAttributes($namespace, $attributes);

        $foundation->group($this->routeGroup, $this->routePrefix, $attributes, $this->getRouteLoader($path));
    }
1279425
final protected function setFileLocation (string $file)
	{
        $file 		= $this->getLocation().$file;
        $pathParts  = pathinfo($file);
        $this->file = !isset($pathParts['extension']) ? $file.".inc" : $file;
	}
241874
protected function loadRoutesFile( $file, $attributes ) {
		if ( empty( $file ) ) {
			return;
		}

		Route::attributes( $attributes )->group( $file );
	}
367864
public function add_template_directory($directory, $namespace = null) {
		if ($this->filesystem_loader === null) {
			$this->filesystem_loader = new \Twig_Loader_Filesystem($directory);
		}

		if ($namespace === null) {
			$this->filesystem_loader->addPath($directory);
		} else {
			$this->filesystem_loader->addPath($directory, $namespace);
		}
	}
295036
public static function register($name, $path, $controller, $parameters, $options=array()) {
		static::$routes[$name] = new static($name, $path, $controller, $parameters, $options);
	}
61461
protected function registerRoutes($files = null)
    {
        $path = $this->getBasePath() . '/' . $this->convention->routesFolder();

        if (is_dir($path)) {
            $routes = is_array($files) ? $files : collect(File::glob($path . '/*.php'))->map(function ($file) {
                return File::name($file);
            })->all();

            foreach ($routes as $route) {
                Route::group(
                    [
                        'namespace'  => $this->config('routes.namespace', $this->getDefaultRouteNamespace()),
                        'prefix'     => $this->config('routes.prefix', $this->shortName()),
                        'as'         => $this->config('routes.as', $this->shortName() . '.'),
                        'middleware' => $this->config('routes.middleware', ['web'])
                    ],
                    sprintf('%s/%s.php', $path, $route)
                );
            }
        }
    }
565373
protected function loadViewsFrom( $path, $namespace )
	{
		if ( is_dir( $appPath = Framework::fw()->basePath . '/resources/views/vendor/' . $namespace ) )
			Framework::get( 'view' )->addNamespace( $namespace, $appPath );

		Framework::get( 'view' )->addNamespace( $namespace, $path );
	}