Zend_Http_Client::__construct PHP Method

__construct() public method

Constructor method. Will create a new HTTP client. Accepts the target URL and optionally configuration array.
public __construct ( Zend_Uri_Http | string $uri = null, array $config = null )
$uri Zend_Uri_Http | string
$config array Configuration key-value pairs.
    public function __construct($uri = null, $config = null)
    {
        if ($uri !== null) {
            $this->setUri($uri);
        }
        if ($config !== null) {
            $this->setConfig($config);
        }
        $this->_queryBracketsEscaped = version_compare(phpversion(), '5.1.3', '>=');
    }

Usage Example

Example #1
0
 /**
  * Constructs Object with Server URL and Configs
  *
  * @param array
  */
 public function __construct($array = false)
 {
     if ($array != false) {
         $this->setTestMode($array[0]);
     }
     parent::__construct($this->getServerUrl(), $this->getConfig());
 }
All Usage Examples Of Zend_Http_Client::__construct