コード例 #1
0
ファイル: ReaderTest.php プロジェクト: edefine/framework
 public function testReadReturnsConfig()
 {
     $reader = new Reader();
     $config = $reader->read(sprintf('%s/data/sample.ini', __DIR__));
     $this->assertInstanceOf('Edefine\\Framework\\Config\\Config', $config);
     $this->assertEquals('baz', $config->get('foo.bar'));
 }
コード例 #2
0
ファイル: ServiceFactory.php プロジェクト: edefine/simple
 /**
  * @return Config\Config
  */
 public function getConfig()
 {
     if (!isset($this->services['config'])) {
         $reader = new Config\Reader();
         $this->services['config'] = $reader->read(sprintf('%s/config.ini', APP_DIR));
     }
     return $this->services['config'];
 }