Added SoapClientBuilder::withProxy()

This commit is contained in:
Francis Besset
2011-10-11 22:07:16 +02:00
parent 55a9b6e233
commit d6c9074c94
2 changed files with 24 additions and 0 deletions

View File

@ -108,6 +108,19 @@ class SoapClientBuilder extends AbstractSoapBuilder
return $this;
}
public function withProxy($host, $port, $username = null, $password = null)
{
$this->soapOptions['proxy_host'] = $host;
$this->soapOptions['proxy_port'] = $port;
if ($username) {
$this->soapOptions['proxy_login'] = $username;
$this->soapOptions['proxy_password'] = $password;
}
return $this;
}
protected function validateOptions()
{
$this->validateWsdl();