Esempio n. 1
0
 /**
  * Enabled debug. At the moment can not disable it
  * @param bool|array $debug
  * @return $this
  *
  * @todo test if using $handlerList->removeByInstance we can disable debug as well
  */
 public function setDebug($debug)
 {
     if ($debug == $this->debug) {
         return $this;
     }
     if ($debug) {
         $handlerList = $this->client->getHandlerList();
         $handlerList->interpose(new TraceMiddleware($debug === true ? [] : $debug));
     }
     return $this;
 }