Liip\RMT\Context::getInstance PHP 메소드

getInstance() 공개 정적인 메소드

public static getInstance ( ) : Context
리턴 Context
    public static function getInstance()
    {
        if (self::$instance == null) {
            self::$instance = new self();
        }
        return self::$instance;
    }

Usage Example

예제 #1
0
파일: ReleaseCommand.php 프로젝트: liip/rmt
 protected function executeActionListIfExist($name, $title = null)
 {
     $actions = Context::getInstance()->getList($name);
     if (count($actions) > 0) {
         $this->getOutput()->writeSmallTitle($title ?: ucfirst($name));
         $this->getOutput()->indent();
         foreach ($actions as $num => $action) {
             $this->getOutput()->write(++$num . ') ' . $action->getTitle() . ' : ');
             $this->getOutput()->indent();
             $action->execute();
             $this->getOutput()->writeEmptyLine();
             $this->getOutput()->unIndent();
         }
         $this->getOutput()->unIndent();
     }
 }
All Usage Examples Of Liip\RMT\Context::getInstance