Small bootstrap.php cleanup.
Questo commit è contenuto in:
parent
3783a9dea0
commit
fee4b127b0
|
@ -26,7 +26,10 @@ if (!defined('RUNTIME_DIR')) {
|
|||
|
||||
require_once(ROOT_DIR . 'vendor/autoload.php');
|
||||
|
||||
$config = new PHPCensor\Config();
|
||||
use PHPCensor\Config;
|
||||
use PHPCensor\Helper\Lang;
|
||||
|
||||
$config = new Config();
|
||||
|
||||
$configFile = APP_DIR . 'config.yml';
|
||||
if (file_exists($configFile)) {
|
||||
|
@ -37,4 +40,4 @@ if (!defined('APP_URL') && !empty($config)) {
|
|||
define('APP_URL', $config->get('php-censor.url', '') . '/');
|
||||
}
|
||||
|
||||
\PHPCensor\Helper\Lang::init($config);
|
||||
Lang::init($config);
|
||||
|
|
|
@ -24,15 +24,8 @@ if (!defined('RUNTIME_DIR')) {
|
|||
define('RUNTIME_DIR', ROOT_DIR . 'runtime/');
|
||||
}
|
||||
|
||||
require_once(ROOT_DIR . 'vendor/autoload.php');
|
||||
|
||||
$conf = [];
|
||||
$conf['php-censor']['url'] = 'http://php-censor.local';
|
||||
|
||||
$config = new PHPCensor\Config($conf);
|
||||
|
||||
if (!defined('APP_URL')) {
|
||||
define('APP_URL', $config->get('php-censor.url', '') . '/');
|
||||
define('APP_URL', 'http://php-censor.local/');
|
||||
}
|
||||
|
||||
\PHPCensor\Helper\Lang::init($config);
|
||||
require_once(ROOT_DIR . 'vendor/autoload.php');
|
||||
|
|
Caricamento…
Crea riferimento in una nuova segnalazione