public function tearDown()
 {
     Net_Http::clearOptions();
 }
Example #2
0
 /**
  * Clears all globally configured options.
  */
 public static function clearOptions()
 {
     self::$options = array();
 }
Example #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);
     }
 }