本文整理汇总了PHP中ProjectConfiguration::getRootDir方法的典型用法代码示例。如果您正苦于以下问题:PHP ProjectConfiguration::getRootDir方法的具体用法?PHP ProjectConfiguration::getRootDir怎么用?PHP ProjectConfiguration::getRootDir使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ProjectConfiguration
的用法示例。
在下文中一共展示了ProjectConfiguration::getRootDir方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: fixture_url
<?php
/*
* This file is part of the symfony package.
* (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
$_test_dir = realpath(dirname(__FILE__) . '/..');
require_once dirname(__FILE__) . '/../../config/ProjectConfiguration.class.php';
$configuration = new ProjectConfiguration(realpath($_test_dir . '/..'));
include $configuration->getSymfonyLibDir() . '/vendor/lime/lime.php';
$sf_symfony_lib_dir = $configuration->getSymfonyLibDir();
$sf_root_dir = $configuration->getRootDir();
require_once $sf_symfony_lib_dir . '/autoload/sfSimpleAutoload.class.php';
$autoload = sfSimpleAutoload::getInstance();
$autoload->addDirectory($sf_symfony_lib_dir);
$autoload->addDirectory($sf_root_dir . '/plugins');
$autoload->addDirectory($sf_root_dir . '/lib');
$autoload->register();
// Commenting this out because it seems to be breaking stuff right now
$app_config = $configuration->getApplicationConfiguration('tracker', 'test', true);
$databaseManager = new sfDatabaseManager($app_config);
//$databaseManager->loadConfiguration();
sfContext::createInstance($app_config, 'tracker');
$sessionPath = sfToolkit::getTmpDir() . '/sessions_' . rand(11111, 99999);
$storage = new sfSessionTestStorage(array('session_path' => $sessionPath));
function fixture_url($name, $file_url = true)
{
global $sf_root_dir;