Gc\Event\StaticEventManager::getInstance PHP Method

getInstance() public static method

Retrieve instance
public static getInstance ( ) : Zend\EventManager\SharedEventManagerInterface
return Zend\EventManager\SharedEventManagerInterface
    public static function getInstance()
    {
        if (static::$instance === null) {
            static::setInstance(new static());
        }
        return static::$instance;
    }

Usage Example

コード例 #1
0
ファイル: AbstractTable.php プロジェクト: gotcms/gotcms
 /**
  * Retrieve event manager
  *
  * @return \Gc\Event\StaticEventManager
  */
 public function events()
 {
     return StaticEventManager::getInstance();
 }