Exemplo n.º 1
0
 /**
  * @test
  * @expectedException Ding\Cache\Exception\CacheException
  */
 public function cannot_get_invalid_cache()
 {
     CacheLocator::configure(array('bdef' => array('impl' => 'asdads')));
     CacheLocator::getDefinitionsCacheInstance();
 }
Exemplo n.º 2
0
 /**
  * This will return a container
  *
  * @param array $properties Container properties.
  *
  * @return ContainerImpl
  */
 public static function getInstance(array $properties = array())
 {
     if (self::$_containerInstance === false) {
         // Init cache subsystems.
         if (isset($properties['ding']['cache'])) {
             CacheLocator::configure($properties['ding']['cache']);
         }
         if (isset($properties['ding']['log4php.properties'])) {
             \Logger::configure($properties['ding']['log4php.properties']);
         }
         self::$_containerInstance = new ContainerImpl($properties['ding']['factory']);
     }
     return self::$_containerInstance;
 }