本文整理汇总了PHP中ConfigManager::getOptionAsPath方法的典型用法代码示例。如果您正苦于以下问题:PHP ConfigManager::getOptionAsPath方法的具体用法?PHP ConfigManager::getOptionAsPath怎么用?PHP ConfigManager::getOptionAsPath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ConfigManager
的用法示例。
在下文中一共展示了ConfigManager::getOptionAsPath方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: define
/**
* @package WACT_DB
* @version $Id: pear.inc.php,v 1.31 2004/11/20 18:09:47 jeffmoore Exp $
*/
//--------------------------------------------------------------------------------
/**
* Make sure dataspace is loaded
*/
if (!class_exists('DataSpace')) {
require WACT_ROOT . 'util/dataspace.inc.php';
}
/**
* Include PEAR::DB
*/
if (!defined('PEAR_LIBRARY_PATH')) {
define('PEAR_LIBRARY_PATH', ConfigManager::getOptionAsPath('config', 'pear', 'library_path'));
}
if (!@(include_once PEAR_LIBRARY_PATH . 'DB.php')) {
RaiseError('runtime', 'LIBRARY_REQUIRED', array('library' => 'PEAR::DB', 'path' => PEAR_LIBRARY_PATH));
}
//--------------------------------------------------------------------------------
/**
* Encapsulates a database connection. Allows for lazy connections.
* implements Connection interface
* @see Connection
* @see http://wact.sourceforge.net/index.php/Connection
* @access public
* @package WACT_DB
*/
class PearConnection
{
示例2: define
define('TMPL_FILESCHEME_PATH', TEST_ROOT . '/filescheme/');
error_reporting(E_ALL);
set_time_limit(600);
ini_set('memory_limit', '128M');
/* Used to determine output to display */
define('DW_TESTS_OUTPUT_HTML', 1);
define('DW_TESTS_OUTPUT_XML', 2);
if (isset($_GET['output']) && $_GET['output'] == 'xml') {
define('DW_TESTS_OUTPUT', DW_TESTS_OUTPUT_XML);
} else {
define('DW_TESTS_OUTPUT', DW_TESTS_OUTPUT_HTML);
}
require_once 'lib/testmanager.php';
TestManager::setup('tests.ini');
if (!defined('SIMPLE_TEST')) {
define('SIMPLE_TEST', ConfigManager::getOptionAsPath('tests', 'simpletest', 'library_path'));
}
if (!@(include_once SIMPLE_TEST . 'reporter.php')) {
RaiseError('runtime', 'LIBRARY_REQUIRED', array('library' => 'Simple Test', 'path' => SIMPLE_TEST));
}
function &DW_TESTS_GetReporter()
{
static $Reporter = NULL;
if (!$Reporter) {
switch (DW_TESTS_OUTPUT) {
case DW_TESTS_OUTPUT_XML:
require_once SIMPLE_TEST . 'xml.php';
$Reporter = new XmlReporter();
break;
case DW_TESTS_OUTPUT_HTML:
default: