re: patch for setting options
| From: | LIMBOURG Arnaud | Date: | Wed, 19 Feb 2003 15:03:47 +0000 |
| Subject: | re: patch for setting options | ||
| Groups: | php.soap | ||
| Request: | Send a blank email to php-soap+get-431@lists.php.net to get a copy of this message | ||
Hi,
Just catching on the discussion
+++ HTTP.php Wed Feb 19 12:26:29 2003
@@ -360,7 +360,12 @@
curl_setopt($ch, CURLOPT_FAILONERROR, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_VERBOSE, 1);
+ if (isset($options['CURLOPT'])) {
+ reset ($options['CURLOPT']);
+ while (list ($key, $val) = each ($options['CURLOPT'])) {
+ curl_setopt($ch, $key, $val);
+ }
+ }
$this->response = curl_exec($ch);
curl_close($ch);
I then set my options like this:
$sc = new SOAP_Client($endpoint);
$sc->__options['CURLOPT'][CURLOPT_VERBOSE] = 0;
$sc->__options['CURLOPT'][CURLOPT_SSL_VERIFYHOST] = 0;
$sc->__options['CURLOPT'][CURLOPT_SSL_VERIFYPEER] = 0;
> I don't think it is the way to go. This just because php allows you to
access an objects attribute directly.
> This is dirty IMO.
>
> The options should be managed more gracefully than that.
Please apply to PEAR::SOAP repository.
> Arnaud.