Beispiel #1
0
 *
 * @category   Enlight
 * @package    Blog
 * @copyright  Copyright (c) 2011, shopware AG (http://www.shopware.de)
 * @license    http://enlight.de/license     New BSD License
 * @version    $Id$
 * @author     Heiner Lohaus
 * @author     Marcel Schmaeing
 * @author     $Author$
 */
/**
 * Application starter
 * This file starts a new Enlight application with a custom configuration
 *
 * @category   Enlight
 * @package    Blog
 * @copyright  Copyright (c) 2011, shopware AG (http://www.shopware.de)
 * @license    http://enlight.de/license     New BSD License
 */
// set the include path to the enlight library and to the application directory
set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__FILE__) . '/../../Library/');
set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__FILE__) . '/../../Apps/');
//include the blog application
include_once 'Blog/Application.php';
/*
 * these are the configuration values for the application
 */
$config = array('app' => 'Blog', 'app_path' => '.', 'adapter' => 'PDO_MYSQL', 'db' => array('host' => '127.0.0.1', 'username' => 'root', 'password' => '', 'dbname' => 'enlightBlog', 'charset' => 'utf8'), 'phpSettings' => array('error_reporting' => E_ALL | E_STRICT, 'display_errors' => 1, 'date.timezone' => 'Europe/Berlin', 'zend.ze1_compatibility_mode' => 0), 'front' => array('noErrorHandler' => false, 'throwExceptions' => true, 'useDefaultControllerAlways' => true, 'disableOutputBuffering' => false, 'showException' => true));
// creates a new Enlight application instance
$app = new Blog_Application('production', $config);
return $app->run();
Beispiel #2
0
/**
 * helper to allocate the Blog_Application instance to the global context
 *
 * @return Blog_Application Blog_Application instance
 */
function Blog()
{
    return Blog_Application::Instance();
}