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