コード例 #1
0
 /**
  * @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
0
ファイル: Module.php プロジェクト: hschletz/braintacle
 /**
  * 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
0
ファイル: Module.php プロジェクト: patrickpreuss/Braintacle
 /**
  * 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
0
 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));
 }