Ejemplo n.º 1
0
 public function __construct($file, $configFile = null)
 {
     OvoSystemRequired::check();
     if (!file_exists($file)) {
         throw new OvoContainerException('File ' . $file . ' not found');
     }
     PropertiesLoader::getInstance(ConfigurationLoader::getOvoConfigurationPath());
     if (isset($configFile)) {
         self::setIniFile($configFile);
     }
     $this->loadApplication($file);
 }
Ejemplo n.º 2
0
 public function __construct($path, $configFile = null)
 {
     OvoSystemRequired::check();
     if (is_null($path) or !is_dir($path)) {
         throw new OvoContainerException('Source dir ' . $path . ' not found');
     }
     AnnotationContainer::addNamespaceToClassLoader(null, $path);
     PropertiesLoader::getInstance(ConfigurationLoader::getOvoConfigurationPath());
     if (isset($configFile)) {
         self::setIniFile($configFile);
     }
     $this->loadApplication($path);
 }
Ejemplo n.º 3
0
 /**
  * @expectedException Ovo\Common\Exception\OvoCommonException
  */
 public function testAddNotParsableIniFile()
 {
     PropertiesLoader::getInstance(__DIR__ . '/ini/simpleWithError.ini');
     PropertiesLoader::getProperty('test');
 }