Load the "routes" file for a given bundle.

@param  string  $bundle
@return void
553841
public static function routes($bundle)
	{
		if (static::routed($bundle)) return;

		$path = static::path($bundle).'routes'.EXT;

		// By setting the bundle property on the router, the router knows what
		// value to replace the (:bundle) place-holder with when the bundle
		// routes are added, keeping the routes flexible.
		Router::$bundle = static::option($bundle, 'handles');

		if ( ! static::routed($bundle) and file_exists($path))
		{
			static::$routed[] = $bundle;

			require $path;
		}
	}
741938
public void loadPropertiesBundle(final String bundleName,
			final Locale locale) {
		LOG.info("Loading properties bundle: " + bundleName);
		ResourceBundle bundle = ResourceBundle.getBundle(bundleName, locale);
		bundles.put(bundleName, bundle);
	}
1183245
private function checkMainBundleJavascript(string $mainBundleJavascriptLocation): void
    {
        if (!$this->filesystem->exists($mainBundleJavascriptLocation)) {
            throw new RuntimeException(sprintf('Main Bundle assets not found in path %s',
                $mainBundleJavascriptLocation));
        }
    }
842335
static function LoadInstalledToFrontend(Site $site)
    {
        $bundles = InstalledBundle::Schema()->Fetch();
        foreach ($bundles as $bundle)
        {
            $manifest = ClassFinder::Manifest($bundle->GetBundle());
            $manifest->LoadToFrontend($site);
        }
    }
1258555
public function load(array $configs, ContainerBuilder $container): void
    {
        $configuration = new Configuration();
        $config = $this->processConfiguration($configuration, $configs);

        $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
        $loader->load('services.yml');

        // If the search bundle is active register search services.
        $bundles = $container->getParameter('kernel.bundles');
        if (isset($bundles['BkstgSearchBundle'])) {
            $loader->load('services.search.yml');
        }
        $this->configureFilesystemAdapter($container, $config);
        $this->configureCdnAdapter($container, $config);
    }
509228
public function removeBundle($bundle)
    {
        $bundles = $this->getBundles();
        if (($key = array_search($this->getBundleString($bundle), $bundles)) !== false) {
            unset($bundles[$key]);
            $this->setBundles($bundles);
        }
    }
779405
private function _loadRoutesFromPackages()
    {
        $this->_routes = array();

        foreach ($this->_packages as $package)
        {
            $packagePath    = 'application/packages/' . str_replace('\\', DIRECTORY_SEPARATOR, $package);
            $routes         = require $packagePath . DIRECTORY_SEPARATOR . 'configs/routes.php';

            foreach ($routes as $route => $value)
            {
                $value['package']       = $package;
                $this->_routes[$route]  = $value;
            }
        }
    }
1321102
private function findTemplatesInBundle(BundleInterface $bundle)
    {
        $name = $bundle->getName();
        $templates = array_unique(array_merge(
            $this->findTemplatesInFolder($bundle->getPath().'/Resources/views'),
            $this->findTemplatesInFolder($this->rootDir.'/'.$name.'/views')
        ));

        foreach ($templates as $i => $template) {
            $templates[$i] = $template->set('bundle', $name);
        }

        return $templates;
    }
303669
public function dump()
    {
        foreach ($this->bundle_paths as $name => $path) {
            if (file_exists($path . DIRECTORY_SEPARATOR . $this->public_res_path)) {
                $this->dumpBundle($name, $path . DIRECTORY_SEPARATOR . $this->public_res_path);
            }
        }
    }
1118173
private function addBundle($bundle)
    {
        if (!in_array($bundle, $this->finalBundles)) {
            if ($bundle instanceof GravitonBundleInterface) {
                $this->bundleStack = array_merge(
                    $this->bundleStack,
                    $bundle->getBundles()
                );
            }

            $this->finalBundles[] = $bundle;
        }
    }
1371663
public function addBundle($bundle)
    {
        $bundle = $this->getBundleString($bundle);
        // not root bundle
        if (strpos($this->getKernal(), $bundle) === false) {
            $bundles = $this->getBundles();
            if (!in_array($bundle, $bundles)) {
                $bundles[] = $bundle;
                $this->setBundles($bundles);
            }
        }
    }
282357
protected function loadFromCache() : void
    {
        $data = include $this->cacheFile;
        if (!is_array($data) ||
            !isset($data['routes']) ||
            !is_array($data['routes']) ||
            !isset($data['dispatch_data']) ||
            !is_array($data['dispatch_data'])
        ) {
            throw new \RuntimeException(sprintf(
                'Invalid cache file "%s"',
                $this->cacheFile
            ));
        }

        $this->routes = $data['routes'];
        $this->dispatchData = $data['dispatch_data'];
    }
1359807
public function load(array $files) : void
    {
        $this->appConfig = $this->getCache()->getOrSet($this->env, function() use ($files){
            $config = $this->loadBaseConfig($files);
            return $this->loadInstalledComponentsConfig($config);
        });
    }
791956
protected static function autoloads($bundle, $config)
	{
		$path = rtrim(Bundle::path($bundle), DS);

		foreach ($config['autoloads'] as $type => $mappings)
		{
			// When registering each type of mapping we'll replace the (:bundle)
			// place-holder with the path to the bundle's root directory, so
			// the developer may dryly register the mappings.
			$mappings = array_map(function($mapping) use ($path)
			{
				return str_replace('(:bundle)', $path, $mapping);

			}, $mappings);

			// Once the mappings are formatted, we will call the Autoloader
			// function matching the mapping type and pass in the array of
			// mappings so they can be registered and used.
			Autoloader::$type($mappings);
		}
	}
409608
protected function runBundles() {
		$bundles = $this->getAllBundles();

		foreach($bundles as $bundle)
			$bundle->run($this->container);
	}
33588
protected function generateCrud(AbstractResourceBundle $bundle)
    {
        $summary = array();
        $this->generateMacrosView($bundle);

        if (in_array('index', $this->configuration['actions'])) {
            $this->generateIndexView($bundle, $summary);
        }

        if (in_array('show', $this->configuration['actions'])) {
            $this->generateShowView($bundle, $summary);
        }

        if (in_array('create', $this->configuration['actions'])) {
            $this->generateCreateView($bundle, $summary);
        }

        if (in_array('update', $this->configuration['actions'])) {
            $this->generateUpdateView($bundle, $summary);
        }

        $this->writeOutput($summary);
    }
405281
public function load(array $bundles)
    {
        $this->finalBundles = $bundles;

        while (!empty($this->bundleStack)) {
            $bundle = array_shift($this->bundleStack);
            $this->addBundle($bundle);
        }

        return $this->finalBundles;
    }