Method Summary
-
setHttpHeader($name, $value, $replace = true)
Sets a HTTP header.
-
array
getContentType()
Gets response content type.
-
addVaryHttpHeader($header)
Adds vary to a http header.
-
string
getHttpHeaders()
Retrieves HTTP headers from the current web response.
-
boolean
isHeaderOnly()
Returns if the response must only consist of HTTP headers.
-
addMeta($key, $value, $replace = true, $escape = true)
Adds a meta header to the current web response.
-
shutdown()
Executes the shutdown procedure.
-
setCookie($name, $value, $expire = null, $path = '/', $domain = '', $secure = false, $httpOnly = false)
Sets a cookie.
-
sendContent()
Send content for the current web response.
-
boolean
initialize((sfContext) $context, $parameters = array())
Initializes this sfWebResponse.
-
addHttpMeta($key, $value, $replace = true)
Adds meta headers to the current web response.
-
addStylesheet($css, $position = '', $options = array())
Adds an stylesheet to the current web response.
-
string
getHttpMetas()
Retrieves meta headers for the current web response.
-
string
getTitle()
Retrieves title for the current web response.
-
string
getDate($timestamp, $type = 'rfc1123')
Retrieves a formated date.
-
setStatusCode($code, $name = null)
Sets response status code.
-
boolean
hasHttpHeader($name)
Has a HTTP header.
-
string
normalizeHeaderName($name)
Retrieves a normalized Header.
-
addJavascript($js, $position = '')
Adds javascript code to the current web response.
-
addCacheControlHttpHeader($name, $value = null)
Adds an control cache http header.
-
string
getStylesheets($position = '')
Retrieves stylesheets for the current web response.
-
array
getMetas()
Retrieves all meta headers for the current web response.
-
string
getStatusCode()
Retrieves status code for the current web response.
-
setTitle($title, $escape = true)
Sets title for the current web response.
-
__wakeup()
Reconstructs any result that web response instance needs.
-
string
getJavascripts($position = '')
Retrieves javascript code from the current web response.
-
sendHttpHeaders()
Send HTTP headers and cookies.
-
array
getHttpHeader($name, $default = null)
Gets HTTP header current value.
-
setContentType($value)
Sets response content type.
-
mergeProperties((sfResponse) $response)
Copies a propertie to a new one.
-
array
__sleep()
Retrieves all objects handlers for the current web response.
-
setHeaderOnly($value = true)
Sets if the response consist of just HTTP headers.
-
array
getCookies()
Retrieves cookies from the current web response.
-
clearHttpHeaders()
Cleans HTTP headers from the current web response.
Methods inherited from sfResponse
setContext , __call , shutdown , newInstance , hasParameter , getParameter , sendContent , initialize , getContent , getContext , getParameterHolder , setParameter , setContent
Method Details
-
setHttpHeader ($name, $value, $replace = true)
Browse code
| $name |
HTTP header name
|
| $value |
Value
|
| $replace |
Replace for the value
|
Sets a HTTP header.
-
(array) getContentType ()
Browse code
Gets response content type.
-
addVaryHttpHeader ($header)
Browse code
Adds vary to a http header.
-
(string) getHttpHeaders ()
Browse code
Retrieves HTTP headers from the current web response.
returns HTTP headers
-
(boolean) isHeaderOnly ()
Browse code
Returns if the response must only consist of HTTP headers.
returns returns true if, false otherwise
-
addMeta ($key, $value, $replace = true, $escape = true)
Browse code
| $key |
Name of the header
|
| $value |
Meta header to be set
|
| $replace |
true if it's replaceable
|
| $escape |
true for escaping the header
|
Adds a meta header to the current web response.
-
Executes the shutdown procedure.
-
setCookie ($name, $value, $expire = null, $path = '/', $domain = '', $secure = false, $httpOnly = false)
Browse code
| $name |
HTTP header name
|
| $value |
Value for the cookie
|
| $expire |
Cookie expiration period
|
| $path |
Path
|
| $domain |
Domain name
|
| $secure |
If secure
|
| $httpOnly |
If uses only HTTP
|
Sets a cookie.
throws sfException If fails to set the cookie
-
Send content for the current web response.
-
(boolean) initialize ((sfContext) $context, $parameters = array())
Browse code
| $context |
A sfContext instance
|
| $parameters |
|
Initializes this sfWebResponse.
returns true, if initialization completes successfully, otherwise false
throws sfInitializationException If an error occurs while initializing this Response
-
addHttpMeta ($key, $value, $replace = true)
Browse code
| $key |
Key to replace
|
| $value |
Value for the replacement
|
| $replace |
Replace or not
|
Adds meta headers to the current web response.
-
addStylesheet ($css, $position = '', $options = array())
Browse code
| $css |
Stylesheet
|
| $position |
Position
|
| $options |
Stylesheet options
|
Adds an stylesheet to the current web response.
-
(string) getHttpMetas ()
Browse code
Retrieves meta headers for the current web response.
returns Meta headers
-
Retrieves title for the current web response.
returns Title
-
(string) getDate ($timestamp, $type = 'rfc1123')
Browse code
| $timestamp |
Timestamp
|
| $type |
Format type
|
Retrieves a formated date.
returns Formated date
-
setStatusCode ($code, $name = null)
Browse code
| $code |
HTTP status code
|
| $name |
HTTP status text
|
Sets response status code.
-
(boolean) hasHttpHeader ($name)
Browse code
Has a HTTP header.
-
(string) normalizeHeaderName ($name)
Browse code
Retrieves a normalized Header.
returns Normalized header
-
addJavascript ($js, $position = '')
Browse code
| $js |
Javascript code
|
| $position |
Directory delimiter
|
Adds javascript code to the current web response.
-
addCacheControlHttpHeader ($name, $value = null)
Browse code
| $name |
HTTP header
|
| $value |
Value for the http header
|
Adds an control cache http header.
-
(string) getStylesheets ($position = '')
Browse code
Retrieves stylesheets for the current web response.
returns Stylesheets
-
Retrieves all meta headers for the current web response.
returns List of meta headers
-
(string) getStatusCode ()
Browse code
Retrieves status code for the current web response.
returns Status code
-
setTitle ($title, $escape = true)
Browse code
| $title |
Title name
|
| $escape |
true, for escaping the title
|
Sets title for the current web response.
-
Reconstructs any result that web response instance needs.
-
(string) getJavascripts ($position = '')
Browse code
| $position |
Directory delimiter
|
Retrieves javascript code from the current web response.
returns Javascript code
-
Send HTTP headers and cookies.
-
(array) getHttpHeader ($name, $default = null)
Browse code
Gets HTTP header current value.
-
setContentType ($value)
Browse code
Sets response content type.
-
mergeProperties ((sfResponse) $response)
Browse code
| $response |
Response instance
|
Copies a propertie to a new one.
-
Retrieves all objects handlers for the current web response.
returns Objects instance
-
setHeaderOnly ($value = true)
Browse code
Sets if the response consist of just HTTP headers.
-
Retrieves cookies from the current web response.
returns Cookies
-
Cleans HTTP headers from the current web response.
|