コード例 #1
0
ファイル: app_dev.php プロジェクト: awesemo/cms-sandbox
<?php

/*
 * This file is part of the Sonata package.
 *
 * (c) Thomas Rabaix <*****@*****.**>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
// this check prevents access to debug front controllers that are deployed by accident to production servers.
// feel free to remove this, extend it, or make something more sophisticated.
if (!in_array(@$_SERVER['REMOTE_ADDR'], array('127.0.0.1', '::1'))) {
    header('HTTP/1.0 403 Forbidden');
    die('You are not allowed to access this file. Check ' . basename(__FILE__) . ' for more information.');
}
include_once __DIR__ . '/bootstrap.php';
sonata_handle('dev', true)->send();
コード例 #2
0
ファイル: app.php プロジェクト: awesemo/cms-sandbox
<?php

/*
 * This file is part of the Sonata package.
 *
 * (c) Thomas Rabaix <*****@*****.**>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
// The app.php file is different from the original one (distributed in the Symfony Distribution)
//
//    The bootstrap.php file contains all initialisation informations, feel free to improve the
//    file to match your requirements.
//
//    The bootstrap.php file also handle kernel detection, by default there are 3 kernels:
//      - /admin => AdminKernel
//      - /api   => ApiKernel
//      - /*     => FrontKernel
//
include_once __DIR__ . '/bootstrap.php';
sonata_handle('prod', false)->send();