Loads the application.
500128
protected function _actionLoad($context)
    {
        //already loaded
        if ($this->_application instanceof ComApplication) {
            return;
        }

        //register exception handler
        set_exception_handler(array($this, 'exception'));

        $identifier = clone $this->getIdentifier();
        $identifier->name = 'application';
        $this->getService('anahita:loader')->loadIdentifier($identifier);

        //no need to create session when using CLI (command line interface)
        $session = (PHP_SAPI == 'cli') ? false : true;

        $this->_application = $this->getService('com:application', array('session' => $session));

        $settings = $this->getService('com:settings.setting');

        $this->getService('anahita:language', array(
            'language' => $settings->language
        ));

        $error_reporting = $settings->error_reporting;

        if ($error_reporting > 0) {
            error_reporting($error_reporting);
            ini_set('display_errors', 1);
            ini_set('display_startup_errors', 1);
        }

        define('ANDEBUG', $settings->debug);

        //set the default timezone to UTC
        date_default_timezone_set('UTC');

        AnRequest::root(str_replace('/'.$this->_application->getName(), '', AnRequest::base()));
    }
1209606
def application(self, v):
        """"""
        self._application = v
        self.backend.set_app(v)
904960
def load_application_files
      if %w(development test).include?(env.to_s)
        config['autoload_paths'].each(&method(:autoreload_constants))
        autoreload_yml
      end
      config['autoload_paths'].each(&method(:require_dependencies))
    end
1125151
private function loadApplicationConfig()
    {
        // load the config
        try{
            $this->applicationConfig = $this->config()->yaml($this->applicationAbsolutePath . 'App/Config/App.yaml');
        }catch (\Exception $e){
            throw new BootstrapException('Unable to read app config file: '.$this->applicationAbsolutePath . 'App/Config/App.yaml');
        }

    }
490769
public void loadPlugins() throws PluginException {
        if (initialised) {
            return;
        }

        ClassLoader gcl = application.getClassLoader();

        attemptLoadPlugins(gcl);

        if (!delayedLoadPlugins.isEmpty()) {
            loadDelayedPlugins();
        }
        if (!delayedEvictions.isEmpty()) {
            processDelayedEvictions();
        }

        pluginList = sortPlugins(pluginList);
        initializePlugins();
        initialised = true;
    }
1103428
public void load() throws IOException {
        if (resource.toExternalForm().endsWith(".xml")) {
            // XML Format
            bundle = new XMLResourceBundle(resource.openStream());
        } else {
            // Properties file (loaded using UTF-8)
            bundle = new UTF8PropertiesResourceBundle(resource.openStream());
        }

        if (bundle.keySet().isEmpty()) {
            throw new IOException(resource.toExternalForm() + " is not a valid resource - no keys");
        }
    }
688924
private void load() {
        InputStream propertiesInputStream = null;
        try {
            propertiesInputStream = propertiesInputStream();
            if (propertiesInputStream == null) {
                throw new IllegalArgumentException("The properties file could not be loaded!");
            }
            properties.load(propertiesInputStream);
        } catch (IOException e) {
            LOGGER.error("Can't load properties", e);
        } finally {
            try {
                if (propertiesInputStream != null) {
                    propertiesInputStream.close();
                }
            } catch (IOException e) {
                LOGGER.error("Can't close the properties InputStream", e);
            }
        }
    }
283622
private function loadApplicationServices()
    {
        // setting default services
        $this->container->set('bbapp', $this->application);
        $this->container->set('container.builder', $this);

        $services_directory = $this->application->getBBDir().'/Config/services';
        foreach (scandir($services_directory) as $file) {
            if (1 === preg_match('#(\w+)\.(yml|xml)$#', $file, $matches)) {
                if ('yml' === $matches[2]) {
                    ServiceLoader::loadServicesFromYamlFile($this->container, $services_directory, $matches[1]);
                } else {
                    ServiceLoader::loadServicesFromXmlFile($this->container, $services_directory, $matches[1]);
                }
            }
        }

        // define in which directory we have to looking for services yml or xml
        $directories = ConfigDirectory::getDirectories(
            null, $this->repository_directory, $this->context, $this->environment
        );

        // Loop into every directory where we can potentially found a services.yml or services.xml
        foreach ($directories as $directory) {
            if (true === is_readable($directory.DIRECTORY_SEPARATOR.self::SERVICE_FILENAME.'.yml')) {
                ServiceLoader::loadServicesFromYamlFile($this->container, $directory);
            }

            if (true === is_readable($directory.DIRECTORY_SEPARATOR.self::SERVICE_FILENAME.'.xml')) {
                ServiceLoader::loadServicesFromXmlFile($this->container, $directory);
            }
        }

        $this->loadLoggerDefinition();
    }
7530
public function load()
    {
        $this->manifest = new ArrayObject(array(
            'name' => $this->getModuleName(),
            'version' => $this->getModuleVersion(),
            'application_config' => array(),
            'autoloader_config' => array(),
            'console' => array(
                'usage' => array(),
            ),
        ));

        $this->loadClassConfig()
             ->loadLayoutConfig()
             ->loadResourceConfig()
             ->loadThemeConfig()
             ->loadServiceConfig()
             ->loadPluginManagerConfigs()
             ->loadLocaleConfig()
             ->loadRouteConfig()
             ->loadDiConfig()
             ->loadConsoleConfig();

//              ->loadDiConfig()
//              ->loadConsoleConfig();

        $this->processIncludes();

        return $this->manifest;
    }
793507
protected static void preloadAndLaunch(final Class<? extends Application> appClass, final Class<? extends Preloader> preloaderClass, final String... args) {
        LauncherImpl.launchApplication(appClass, preloaderClass, args);
    }
417712
public function load()
    {
        if ($this->loaded) {
            return;
        }

        $event = new PackageEvent($this);
        $this->getEventManager()->fire(self::EVENT_ON_LOAD, $event);
        $cacheFile = $this->getCacheFile();
        
        if (null !== $cacheFile && file_exists($cacheFile)) {
            $this->mergedConfig = include $cacheFile;
        } else {
            foreach ($this->getEventManager()->fire(self::EVENT_ON_MERGE, $event) as $config) {
                if (empty($config)) {
                    continue;
                }
                
                $this->mergedConfig = $this->merge($this->mergedConfig, $config);
            }
            $this->writeCache();
        }

        $this->loaded = true;
    }
203545
protected function load()
    {
        $json = file_get_contents($this->filename);
        if (false === $json) {
            // @codeCoverageIgnoreStart
            throw new RuntimeException('Unable to open file ' . $this->filename);
            // @codeCoverageIgnoreEnd
        }

        $this->unserialize($json);
        $this->cookies = $this->cookies ?: array();
    }
83502
public void loadConfiguration()
	{

		XMLFileChooser fc = new XMLFileChooser();
		if (fc.showOpenDialog(new JPanel()) == XMLFileChooser.APPROVE_OPTION) {
			this.loadConfig(fc.getSelectedFile().getPath());
		}
	}
215264
public function load()
    {
        $files = scandir($this->getPath());

        foreach($files as $file) {
            if(
                $file === "." ||
                $file === ".."
            ) {
                continue;
            }

            if(is_file($this->getPath().$file)) {
                $this->_files[$file] = $file;
            } else if(is_dir($this->getPath().$file)) {
                $this->_directories[$file] = $file;
            }
        }
    }
1250949
protected final void load()throws Exception
	{
		rwLock.writeLock().lock();
		try {
			Set<Class<?>> classes=classProvider.getLoadedClasses();
			initScriptClasses(classes);
			onScriptLoaded(classes);
		} finally {
			rwLock.writeLock().unlock();
		}
	}
203443
public static function load()
	{
		static::start(Config::get('session.driver'));

		static::$instance->load(Cookie::get(Config::get('session.cookie')));
	}
635009
public void start() throws Exception {
        bundleClassResolverHelper = new BundleClassResolverHelper(bundleContext);
        bundleClassResolverHelper.setApplicationName(applicationName);
        bundleClassResolverHelper.register();
    }