Example #1
0
protected function visit_plugins(RequestInterface $request, $value, $flags)
{
if (!is_array($value)) {
throw new InvalidArgumentException('plugins value must be an array');
}

foreach ($value as $plugin) {
$request->addSubscriber($plugin);
}
}
Example #2
0
 protected function visit_debug(RequestInterface $request, $value, $flags)
 {
     if (class_exists('Guzzle\\Plugin\\Log\\LogPlugin')) {
         $request->addSubscriber(LogPlugin::getDebugPlugin());
     } else {
         // @codeCoverageIgnoreStart
         $request->getCurlOptions()->set(CURLOPT_VERBOSE, true);
         // @codeCoverageIgnoreEnd
     }
 }