Newscoop\Service\Resource\ResourceRepository::getInstance PHP 메소드

getInstance() 공개 정적인 메소드

Provides the singletone of the resource repository.
public static getInstance ( ) : Newscoop\Service\Resource\ResourceRespository
리턴 Newscoop\Service\Resource\ResourceRespository The singletone.
    public static function getInstance()
    {
        if (self::$instance === NULL) {
            self::$instance = new self();
        }
        return self::$instance;
    }

Usage Example

예제 #1
0
 /**
  * Provides the properties for the current resource id.
  *
  * @return array
  *		The array containing all the properties, not null can be empty.
  */
 public function getProperties()
 {
     return ResourceRepository::getInstance()->getResourceFor($this);
 }