use Guzzle\Plugin\Cache\CachePlugin; use Guzzle\Plugin\Log\LogPlugin; $client = new Client('https://igor.io/'); $client->addSubscriber(new LogPlugin( new Zf1LogAdapter( new \Zend_Log(new \Zend_Log_Writer_Stream('php://output')) ), MessageFormatter::DEBUG_FORMAT )); $client->addSubscriber(new CachePlugin(array( 'adapter' => new DoctrineCacheAdapter(new ArrayCache()), ))); $response = $client->get('/')->send();
Douche bags use it, your kids use it, your mail man uses it, and your fucking dog uses it. If you got swag, you generally wear those shitty hats side way, and your ass hanging out like a fucking goof cause your pants are half way down your white ass legs.
use Symfony\Component\HttpKernel\EventListener\RouterListener; use Symfony\Component\Routing\Matcher\UrlMatcher; use Symfony\Component\Routing\RequestContext; use Symfony\Component\Routing\RouteCollection; use Symfony\Component\Routing\Route; $routes = new RouteCollection(); $routes->add('foo', new Route('/foo', [ '_controller' => function (Request $request) { return new Response('foo!'); }, ])); $dispatcher = new EventDispatcher(); $dispatcher->addSubscriber(new RouterListener( new UrlMatcher($routes, new RequestContext()) )); $kernel = new HttpKernel($dispatcher, new ControllerResolver()); $request = Request::createFromGlobals(); $response = $kernel->handle($request); $response->send();