예제 #1
0
파일: Di.php 프로젝트: pierredup/di
 /**
  * Clears the current mapping and instances
  *
  * @static
  */
 public static function clear()
 {
     self::$map = array();
     self::$instances = array();
 }
예제 #2
0
파일: DiTest.php 프로젝트: pierredup/di
 public function test_overwrite_class_name()
 {
     Di::map(array('DiTest\\Bar' => Di::get('DiTest\\BazBar')));
     $object = Di::get('DiTest\\Baz');
     $this->assertInstanceOf('DiTest\\BazBar', $object->param1);
 }