예제 #1
2
 public function createApplication()
 {
     $app = new \Eccube\Application();
     $app->initialize();
     $app->initializePlugin();
     $app->boot();
     $paths = array();
     $paths[] = $app['config']['template_admin_realdir'];
     $paths[] = $app['config']['template_realdir'];
     $paths[] = $app['config']['template_default_realdir'];
     $app['twig.loader']->addLoader(new \Twig_Loader_Filesystem($paths));
     $app['admin'] = true;
     $app['front'] = true;
     return $app;
 }
예제 #2
0
    || isset($_SERVER['HTTP_X_FORWARDED_FOR'])
    || !in_array(@$_SERVER['REMOTE_ADDR'], $allow)
) {
    header('HTTP/1.0 403 Forbidden');
    exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');
}
*/
require_once __DIR__ . '/../autoload.php';
Debug::enable();
// load configs.
$app = new Eccube\Application();
// debug enable.
$app['debug'] = true;
// initialize servicies.
$app->initialize();
$app->initializePlugin();
// load config dev
$conf = $app['config'];
$app['config'] = $app->share(function () use($conf) {
    $confarray = array();
    $config_dev_file = __DIR__ . '/../app/config/eccube/config_dev.yml';
    if (file_exists($config_dev_file)) {
        $config_dev = Yaml::parse(file_get_contents($config_dev_file));
        if (isset($config_dev)) {
            $confarray = array_replace_recursive($confarray, $config_dev);
        }
    }
    return array_replace_recursive($conf, $confarray);
});
// config_dev.ymlにmailが設定されていた場合、config_dev.ymlの設定内容を反映
$app['swiftmailer.options'] = $app['config']['mail'];