示例#1
0
 /**
  * Construct a new request object
  * @param Url $url
  * @param array $headers
  */
 public function __construct(Url $url, array $headers = [], Configuration $configuration = null)
 {
     parent::__construct();
     $this->url = $url;
     $this->configuration = $configuration === null ? new Configuration() : $configuration;
     $this->addHeaders($headers);
 }
示例#2
0
 /**
  * Build the response with Request dependency injection
  * @param AbstractRequest $request
  */
 public function __construct(AbstractRequest $request = null)
 {
     parent::__construct();
     $this->request = $request;
 }