mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 15:33:15 +00:00
add environnement to bootstrap::execute
This commit is contained in:
@@ -8,6 +8,9 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
require_once __DIR__ . '/../Alchemy/Phrasea/Core.php';
|
||||||
|
|
||||||
|
use Alchemy\Phrasea\Core;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -15,9 +18,6 @@
|
|||||||
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
||||||
* @link www.phraseanet.com
|
* @link www.phraseanet.com
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once __DIR__ . '/../Alchemy/Phrasea/Core.php';
|
|
||||||
|
|
||||||
class bootstrap
|
class bootstrap
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -25,21 +25,22 @@ class bootstrap
|
|||||||
|
|
||||||
public static function set_php_configuration()
|
public static function set_php_configuration()
|
||||||
{
|
{
|
||||||
return Alchemy\Phrasea\Core::initPHPConf();
|
return Core::initPHPConf();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
* @param $env
|
||||||
* @return Alchemy\Phrasea\Core
|
* @return Alchemy\Phrasea\Core
|
||||||
*/
|
*/
|
||||||
public static function execute($env = 'main')
|
public static function execute($env = null)
|
||||||
{
|
{
|
||||||
if(static::$core)
|
if (static::$core)
|
||||||
{
|
{
|
||||||
return static::$core;
|
return static::$core;
|
||||||
}
|
}
|
||||||
|
|
||||||
static::$core = new Alchemy\Phrasea\Core($env);
|
static::$core = new Core($env);
|
||||||
|
|
||||||
return static::$core;
|
return static::$core;
|
||||||
}
|
}
|
||||||
@@ -55,7 +56,7 @@ class bootstrap
|
|||||||
|
|
||||||
public static function register_autoloads()
|
public static function register_autoloads()
|
||||||
{
|
{
|
||||||
return Alchemy\Phrasea\Core::initAutoloads();
|
return Core::initAutoloads();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user