Webmozart\Console\Api\Config\Config::getHandler PHP 메소드

getHandler() 공개 메소드

Returns the command handler to execute when a command is run.
또한 보기: setHandler()
public getHandler ( ) : object
리턴 object The command handler.
    public function getHandler()
    {
        if (!$this->handler) {
            return $this->getDefaultHandler();
        }
        if (is_callable($this->handler)) {
            $this->handler = call_user_func($this->handler);
        }
        return $this->handler;
    }

Usage Example

예제 #1
0
 public function testDefaultHandler()
 {
     $this->assertEquals(new NullHandler(), $this->config->getHandler());
 }