예제 #1
0
 /**
  * Returns information about the CURL response.
  * @return CAttributeCollection the curl response details
  */
 public function getInfo()
 {
     if ($this->_info === null) {
         $this->_info = new CAttributeCollection(curl_getinfo($this->request->getHandle()), true);
     }
     return $this->_info;
 }
예제 #2
0
 /**
  * Applies the options to the specified ACurl object.
  * @param ACurl $curl The ACurl object to apply the options to
  */
 public function applyTo(ACurl $curl)
 {
     foreach ($this as $key => $value) {
         $constant = constant($this->getConstantName($key));
         curl_setopt($curl->getHandle(), $constant, $value);
     }
 }