/** * add a new request to the pool. */ public function add(Request $request, array $opts = array()) { $ch = $request->build($opts); $this->requests[(int) $request->resource] = $request; curl_multi_add_handle($this->resource, $request->resource); return $request; }
public function run() { // Binder do banco $this->db = new Database(); global $db; $db = $this->db; $this->dbo = new DatabaseOld(); global $dbo; $dbo = $this->dbo; // Binder dos configs $this->config = (object) array('db' => Config::db(), 'email' => Config::email()); // Binder do request Request::build(); // Binder do router $this->router = new Router(); }
public function send(Request $request) { return new Response($this->client->send($request->build())); }