Beispiel #1
0
 /**
  * Proxies a call to start or end event based on a request event.
  *
  * @param string         $meth startEvent or endEvent
  * @param EventInterface $cev  Command event
  * @param EventInterface $rev  Request event
  */
 private function proxyReqEvent($meth, EventInterface $cev, EventInterface $rev)
 {
     /** @var \GuzzleHttp\Command\Event\AbstractCommandEvent $cev */
     /** @noinspection PhpUndefinedMethodInspection */
     call_user_func(array($this, $meth), $this->getEventName($rev), $this->hashCommand($cev->getClient(), $cev->getCommand(), $rev), $cev->getCommand(), $rev->getRequest(), method_exists($rev, 'getResponse') ? $rev->getResponse() : null, method_exists($cev, 'getResult') ? $cev->getResult() : null, method_exists($cev, 'getError') ? $cev->getError() : null);
 }
Beispiel #2
0
 /**
  * Proxies a call to start or end event based on a request event.
  *
  * @param string         $meth startEvent or endEvent
  * @param EventInterface $cev  Command event
  * @param EventInterface $rev  Request event
  */
 private function proxyReqEvent($meth, EventInterface $cev, EventInterface $rev)
 {
     call_user_func([$this, $meth], $this->getEventName($rev), $this->hashCommand($cev->getClient(), $cev->getCommand(), $rev), $cev->getCommand(), $rev->getRequest(), method_exists($rev, 'getResponse') ? $rev->getResponse() : null, method_exists($cev, 'getResult') ? $cev->getResult() : null, method_exists($cev, 'getError') ? $cev->getError() : null);
 }