W3cubDocs

/Phalcon 2

Class Phalcon\Http\Response\Headers

implements Phalcon\Http\Response\HeadersInterface

This class is a bag to manage the response headers

Methods

public set (string $name, string $value)

Sets a header to be sent at the end of the request

public string get (string $name)

Gets a header value from the internal bag

public setRaw (string $header)

Sets a raw header to be sent at the end of the request

public remove (unknown $header_index)

Removes a header to be sent at the end of the request

public boolean send ()

Sends the headers to the client

public reset ()

Reset set headers

public array toArray ()

Returns the current headers as an array

public static Phalcon\Http\Response\Headers __set_state (array $data)

Restore a Phalcon\Http\Response\Headers object

© 2011–2016 Phalcon Framework Team
Licensed under the Creative Commons Attribution License 3.0.
https://docs.phalconphp.com/en/2.0.0/api/Phalcon_Http_Response_Headers.html