本文整理匯總了PHP中Library\Application::getPath方法的典型用法代碼示例。如果您正苦於以下問題:PHP Application::getPath方法的具體用法?PHP Application::getPath怎麽用?PHP Application::getPath使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Library\Application
的用法示例。
在下文中一共展示了Application::getPath方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __invoke
/**
* @internal
*/
public function __invoke(\Interop\Container\ContainerInterface $container, $requestedName, array $options = null)
{
$applicationConfig = $container->get('ApplicationConfig');
if (isset($applicationConfig['Library\\UserConfig'])) {
return $applicationConfig['Library\\UserConfig'];
} else {
$reader = new \Zend\Config\Reader\Ini();
return $reader->fromFile(getenv('BRAINTACLE_CONFIG') ?: \Library\Application::getPath('user_config/braintacle.ini'));
}
}
示例2: getPath
/**
* Get path to module directory
*
* @param string $path Optional path component that is appended to the module root path
* @return string Absolute path to requested file/directory (directories without trailing slash)
*/
public static function getPath($path = '')
{
return \Library\Application::getPath('module/Model/' . $path);
}
示例3: getPath
/**
* Get path to module directory
*
* @param string $path Optional path component that is appended to the module root path
* @return string Absolute path to requested file/directory (directories without trailing slash)
*/
static function getPath($path = '')
{
return \Library\Application::getPath('module/Console/' . $path);
}
示例4: testGetApplicationConfigWithTestEnvironment
public function testGetApplicationConfigWithTestEnvironment()
{
$this->assertEquals(array_merge_recursive(require Application::getPath('config/application.config.php'), array('modules' => array('moduleName'), 'module_listener_options' => array('module_paths' => array(realpath(__DIR__ . '/../..'))), 'Library\\UserConfig' => array('debug' => array('display backtrace' => true, 'report missing translations' => true)))), Application::getApplicationConfig('moduleName', true));
}