本文整理汇总了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);