Gc\Registry::getInstance PHP 메소드

getInstance() 공개 정적인 메소드

Retrieves the default registry instance.
public static getInstance ( ) : Registry
리턴 Registry
    public static function getInstance()
    {
        if (self::$registry === null) {
            self::init();
        }
        return self::$registry;
    }

Usage Example

예제 #1
0
 /**
  * Test
  *
  * @return void
  */
 public function testSetInstance()
 {
     $this->object->unsetInstance();
     $this->object->setInstance(new Registry());
     $this->assertInstanceOf('Gc\\Registry', Registry::getInstance());
 }