addHeader() public method

public addHeader ( string $name, string $value, boolean $override = true )
$name string Nome do campo de cabeçalho.
$value string Valor do campo de cabeçalho.
$override boolean Indica se o campo deverá ser sobrescrito caso já tenha sido definido.
コード例 #1
0
ファイル: PayPal.php プロジェクト: netojoaobatista/paypal
	/**
	 * @return	HTTPConnection
	 */
	public function getHTTPConnection() {
		$httpConnection = new HTTPConnection();
		$httpConnection->addHeader( 'X-PAYPAL-APPLICATION-ID' , $this->applicationId );
		$httpConnection->addHeader( 'X-PAYPAL-REQUEST-DATA-FORMAT' , $this->requestDataFormat );
		$httpConnection->addHeader( 'X-PAYPAL-RESPONSE-DATA-FORMAT' , $this->responseDataFormat );
		$httpConnection->addHeader( 'X-Target-URI' , $this->targetHost );
		$httpConnection->setAuthenticator( $this->authenticator );
		$httpConnection->setCookieManager( new HTTPCookieManager() );
		$httpConnection->initialize( $this->targetHost , true );

		return $httpConnection;
	}