Esempio n. 1
0
 public function tearDown()
 {
     Net_Http::clearOptions();
 }
Esempio n. 2
0
 /**
  * Clears all globally configured options.
  */
 public static function clearOptions()
 {
     self::$options = array();
 }
Esempio n. 3
0
 /**
  * Initializes the cURL resource handle.
  */
 public function __construct()
 {
     $this->headers = array();
     $this->options[CURLOPT_HEADERFUNCTION] = array($this, 'parseHeader');
     $this->options[CURLOPT_WRITEFUNCTION] = array($this, 'parseBody');
     if (!ini_get("open_basedir")) {
         $this->options[CURLOPT_FOLLOWLOCATION] = true;
     } else {
         $this->followLocation = true;
     }
     if ($options = Net_Http::getOptions()) {
         $this->options = array_replace($this->options, $options);
     }
 }