本文整理匯總了PHP中ezcBase::setRunMode方法的典型用法代碼示例。如果您正苦於以下問題:PHP ezcBase::setRunMode方法的具體用法?PHP ezcBase::setRunMode怎麽用?PHP ezcBase::setRunMode使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ezcBase
的用法示例。
在下文中一共展示了ezcBase::setRunMode方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: testSetGetRunMode
public function testSetGetRunMode()
{
self::assertEquals(ezcBase::MODE_DEVELOPMENT, ezcBase::getRunMode());
self::assertEquals(true, ezcBase::inDevMode());
ezcBase::setRunMode(ezcBase::MODE_PRODUCTION);
self::assertEquals(ezcBase::MODE_PRODUCTION, ezcBase::getRunMode());
self::assertEquals(false, ezcBase::inDevMode());
ezcBase::setRunMode(ezcBase::MODE_DEVELOPMENT);
self::assertEquals(ezcBase::MODE_DEVELOPMENT, ezcBase::getRunMode());
self::assertEquals(true, ezcBase::inDevMode());
}
示例2: define
<?php
// {{{ class autoload setup
define('EZC_TRUNK_PATH', join(DIRECTORY_SEPARATOR, array(dirname(__FILE__), 'ezc', 'trunk')));
define('APPS_TRUNK_PATH', join(DIRECTORY_SEPARATOR, array(dirname(__FILE__), 'apps')));
define('DOCTRINE_PATH', join(DIRECTORY_SEPARATOR, array(dirname(__FILE__), 'doctrine')));
set_include_path(join(PATH_SEPARATOR, array(get_include_path(), EZC_TRUNK_PATH, APPS_TRUNK_PATH)));
require join(DIRECTORY_SEPARATOR, array(DOCTRINE_PATH, 'lib', 'Doctrine.php'));
spl_autoload_register(array('Doctrine', 'autoload'));
require 'ezc/Base/src/base.php';
ezcBase::setRunMode(ezcBase::MODE_DEVELOPMENT);
spl_autoload_register(array('ezcBase', 'autoload'));
include dirname(__FILE__) . '/apps/dev/autoload_config.php';
// }}}
Doctrine_Manager::connection("mysql://fcgid:...@localhost/shared", 'main');
include 'framework_part0.php';
$project = aiiProjectConfiguration::instance(dirname(__FILE__), 'ocpsys');
$installedApps = array('core', 'admin', 'sites', 'dev', 'pages');
$appsPaths = array();
foreach ($installedApps as $appName) {
// i know my apps are all in the same dir
$appsPaths[] = join(DIRECTORY_SEPARATOR, array(APPS_TRUNK_PATH, $appName));
}
$project->setUp($appsPaths);
unset($installedApps);
unset($appsPaths);
unset($appName);