protected function bootstrap($disableSessions = true, $loadZikulaCore = true, $fakeRequest = true) { define('_ZINSTALLVER', \Zikula_Core::VERSION_NUM); $kernel = $this->getContainer()->get('kernel'); $loader = (require $kernel->getRootDir() . '/autoload.php'); \ZLoader::register($loader); if ($loadZikulaCore && !$this->getContainer()->has('zikula')) { $core = new Zikula_Core(); $core->setKernel($kernel); $core->boot(); foreach ($GLOBALS['ZConfig'] as $config) { $core->getContainer()->loadArguments($config); } $GLOBALS['ZConfig']['System']['temp'] = $core->getContainer()->getParameter('temp_dir'); $GLOBALS['ZConfig']['System']['datadir'] = $core->getContainer()->getParameter('datadir'); $GLOBALS['ZConfig']['System']['system.chmod_dir'] = $core->getContainer()->getParameter('system.chmod_dir'); \ServiceUtil::getManager($core); \EventUtil::getManager($core); } if ($disableSessions) { // Disable sessions. $this->getContainer()->set('session.storage', new MockArraySessionStorage()); $this->getContainer()->set('session.handler', new NullSessionHandler()); } if ($fakeRequest) { // Fake request $request = Request::create('http://localhost/install'); $this->getContainer()->set('request', $request); } }
<?php /** * Copyright Zikula Foundation 2009 - Zikula Application Framework * * This work is contributed to the Zikula Foundation under one or more * Contributor Agreements and licensed to You under the following license: * * @license GNU/LGPLv3 (or at your option, any later version). * @package Zikula * * Please see the NOTICE file distributed with this source code for further * information regarding copyright and licensing. */ $bootstrap = file_exists(__DIR__ . '/bootstrap.php.cache') ? __DIR__ . '/bootstrap.php.cache' : __DIR__ . '/autoload.php'; require_once $bootstrap; require_once __DIR__ . '/AppKernel.php'; require_once __DIR__ . '/AppCache.php'; require_once __DIR__ . '/../src/legacy/ZLoader.php'; ZLoader::register();
* Copyright Zikula Foundation 2009 - Zikula Application Framework * * This work is contributed to the Zikula Foundation under one or more * Contributor Agreements and licensed to You under the following license: * * @license GNU/LGPLv3 (or at your option, any later version). * @package Zikula * * Please see the NOTICE file distributed with this source code for further * information regarding copyright and licensing. */ use Symfony\Component\Debug\Debug; use Symfony\Component\Yaml\Yaml; use Zikula\Core\Event\GenericEvent; $loader = (require __DIR__ . '/../app/autoload.php'); ZLoader::register($loader); /** * create aliases for psr-4 1.4.1-classnames to psr-0 <= 1.4.0-legacy for BC */ class_alias('\\Zikula\\CategoriesModule\\Entity\\CategoryEntity', '\\Zikula\\Module\\CategoriesModule\\Entity\\CategoryEntity', true); class_alias('\\Zikula\\UsersModule\\Entity\\UserEntity', '\\Zikula\\Module\\UsersModule\\Entity\\UserEntity', true); class_alias('\\Zikula\\ExtensionsModule\\Entity\\ExtensionVarEntity', '\\Zikula\\Core\\Doctrine\\Entity\\ExtensionVarEntity', true); class_alias('\\Zikula\\ExtensionsModule\\Entity\\ExtensionEntity', '\\Zikula\\Core\\Doctrine\\Entity\\ExtensionEntity', true); class_alias('\\Zikula\\ExtensionsModule\\Entity\\ExtensionDependencyEntity', '\\Zikula\\Core\\Doctrine\\Entity\\ExtensionDependencyEntity', true); class_alias('\\Zikula\\CategoriesModule\\Entity\\AbstractCategoryAssignment', '\\Zikula\\Core\\Doctrine\\Entity\\AbstractEntityCategory', true); $kernelConfig = Yaml::parse(file_get_contents(__DIR__ . '/../app/config/parameters.yml')); if (is_readable($file = __DIR__ . '/../app/config/custom_parameters.yml')) { $kernelConfig = array_merge($kernelConfig, Yaml::parse(file_get_contents($file))); } $kernelConfig = $kernelConfig['parameters']; if ($kernelConfig['env'] !== 'prod') {