Robo\Robo::service PHP 메소드

service() 공개 정적인 메소드

Use this method if the desired service is not one of those with a dedicated accessor method below. If it is listed below, those methods are preferred as they can return useful type hints.
public static service ( string $id ) : mixed
$id string The ID of the service to retrieve.
리턴 mixed The specified service.
    public static function service($id)
    {
        return static::getContainer()->get($id);
    }

Usage Example

예제 #1
0
파일: OutputTest.php 프로젝트: jjok/Robo
 protected function _before()
 {
     $this->dialog = new Symfony\Component\Console\Helper\QuestionHelper();
     $this->setOutput(Robo::service('output'));
 }