ECT::getHTTPConnection PHP Method

getHTTPConnection() public method

public getHTTPConnection ( ) : HTTPConnection
return HTTPConnection
    public function getHTTPConnection()
    {
        $httpConnection = new HTTPConnection();
        $httpConnection->setCookieManager(new HTTPCookieManager());
        return $httpConnection;
    }

Usage Example

Example #1
0
 /**
  * @brief	Constroi o objeto que representa uma API do Correios
  * @param	ECT $ect
  */
 public function __construct(ECT $ect)
 {
     $this->ect = $ect;
     $this->httpConnection = $ect->getHTTPConnection();
     $this->httpConnection->initialize($this->getTargetHost());
 }