예제 #1
0
파일: index.php 프로젝트: robeendey/ce
                    define('_ENGINE_R_MAIN', false);
                    define('_ENGINE_R_INIT', true);
                }
            }
        }
    }
}
// Boot
if (_ENGINE_R_INIT) {
    // Application
    require_once 'Engine/Loader.php';
    require_once 'Engine/Application.php';
    Engine_Loader::getInstance()->register('Zend', APPLICATION_PATH_COR . DS . 'libraries' . DS . 'Zend')->register('Engine', APPLICATION_PATH_COR . DS . 'libraries' . DS . 'Engine')->register('Facebook', APPLICATION_PATH_COR . DS . 'libraries' . DS . 'Facebook')->register('Plugin', APPLICATION_PATH_COR . DS . 'plugins')->register('Widget', APPLICATION_PATH_COR . DS . 'widgets');
    // Create application, bootstrap, and run
    $application = new Engine_Application(APPLICATION_ENV, array('bootstrap' => array('path' => APPLICATION_PATH_COR . DS . 'modules' . DS . APPLICATION_NAME . DS . 'Bootstrap.php', 'class' => ucfirst(APPLICATION_NAME) . '_Bootstrap')));
    Engine_Api::getInstance()->setApplication($application);
}
// config mode
if (defined('_ENGINE_R_CONF') && _ENGINE_R_CONF) {
    return;
}
if (!empty($_SERVER['_ENGINE_TRACE_ALLOW']) && extension_loaded('xdebug')) {
    xdebug_start_trace();
}
// Sub apps
if (_ENGINE_R_MAIN) {
    require dirname(__FILE__) . DS . _ENGINE_R_MAIN;
    exit;
} else {
    if (APPLICATION_ENV !== 'development') {
        try {
예제 #2
0
    ini_set('display_startup_errors', 0);
    ini_set('error_reporting', E_STRICT);
}
define('_ENGINE_CUR_PATH', dirname(__FILE__));
defined('APPLICATION_PATH') || define('APPLICATION_PATH', realpath(dirname(dirname(dirname(dirname(dirname(dirname(__FILE__))))))));
// Config
if (!defined('_ENGINE_R_MAIN')) {
    define('_ENGINE_R_REWRITE', true);
    define('_ENGINE_R_CONF', true);
    define('_ENGINE_R_INIT', true);
    $indexFile = APPLICATION_PATH . '/application/index.php';
    //exit($indexFile);
    include_once $indexFile;
}
// Create application, bootstrap, and run
$application = Engine_Api::getInstance()->getApplication();
//$application = Engine_Api::getInstance()->getApplication();
$application->getBootstrap()->bootstrap('frontcontroller');
$application->getBootstrap()->bootstrap('cache');
$application->getBootstrap()->bootstrap('db');
$application->getBootstrap()->bootstrap('translate');
$application->getBootstrap()->bootstrap('frontcontrollermodules');
$application->getBootstrap()->bootstrap('session');
$application->getBootstrap()->bootstrap('manifest');
$application->getBootstrap()->bootstrap('router');
$application->getBootstrap()->bootstrap('view');
$application->getBootstrap()->bootstrap('layout');
$application->getBootstrap()->bootstrap('modules');
function getLog($filename = 'store.notify.log')
{
    $writer = new Zend_Log_Writer_Stream(APPLICATION_PATH . '/temporary/log/' . $filename);
예제 #3
0
 public function _before(\Codeception\TestCase $test)
 {
     // Create application, bootstrap, and run
     $this->bootstrap = new \Engine_Application(array('environment' => APPLICATION_ENV, 'bootstrap' => array('path' => APPLICATION_PATH_COR . DS . 'modules' . DS . APPLICATION_NAME . DS . 'Bootstrap.php', 'class' => ucfirst(APPLICATION_NAME) . '_Bootstrap'), 'autoloaderNamespaces' => array('Zend' => APPLICATION_PATH_LIB . DS . 'Zend', 'Engine' => APPLICATION_PATH_LIB . DS . 'Engine', 'Facebook' => APPLICATION_PATH_LIB . DS . 'Facebook', 'Bootstrap' => APPLICATION_PATH_BTS, 'Plugin' => APPLICATION_PATH_PLU, 'Widget' => APPLICATION_PATH_WID)));
     \Zend_Session::$_unitTestEnabled = true;
     \Engine_Application::setInstance($this->bootstrap);
     \Engine_Api::getInstance()->setApplication($this->bootstrap);
     $this->bootstrap->bootstrap();
     $this->client->setBootstrap($this->bootstrap);
 }