當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ezcBase::setRunMode方法代碼示例

本文整理匯總了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());
 }
開發者ID:broschb,項目名稱:cyclebrain,代碼行數:11,代碼來源:base_test.php

示例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);
開發者ID:jpic,項目名稱:ezc-framework-apps,代碼行數:27,代碼來源:config.php


注:本文中的ezcBase::setRunMode方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。