[ Index ]
 

Code source de Symfony 1.0.0

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/lib/response/ -> sfWebResponse.class.php (sommaire)

(pas de description)

Poids: 619 lignes (15 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

sfWebResponse:: (34 méthodes):
  initialize()
  setHeaderOnly()
  isHeaderOnly()
  setCookie()
  setStatusCode()
  getStatusCode()
  setHttpHeader()
  getHttpHeader()
  hasHttpHeader()
  setContentType()
  getContentType()
  sendHttpHeaders()
  sendContent()
  normalizeHeaderName()
  getDate()
  addVaryHttpHeader()
  addCacheControlHttpHeader()
  getHttpMetas()
  addHttpMeta()
  getMetas()
  addMeta()
  getTitle()
  setTitle()
  getStylesheets()
  addStylesheet()
  getJavascripts()
  addJavascript()
  getCookies()
  getHttpHeaders()
  clearHttpHeaders()
  mergeProperties()
  __sleep()
  __wakeup()
  shutdown()


Classe: sfWebResponse  - X-Ref

sfWebResponse class.

This class manages web reponses. It supports cookies and headers management.

initialize($context, $parameters = array()   X-Ref
Initializes this sfWebResponse.

param: sfContext A sfContext instance
return: boolean true, if initialization completes successfully, otherwise false

setHeaderOnly($value = true)   X-Ref
Sets if the response consist of just HTTP headers.

param: boolean

isHeaderOnly()   X-Ref
Returns if the response must only consist of HTTP headers.

return: boolean returns true if, false otherwise

setCookie($name, $value, $expire = null, $path = '/', $domain = '', $secure = false, $httpOnly = false)   X-Ref
Sets a cookie.

param: string HTTP header name
param: string Value for the cookie
param: string Cookie expiration period
param: string Path
param: string Domain name
param: boolean If secure
param: boolean If uses only HTTP

setStatusCode($code, $name = null)   X-Ref
Sets response status code.

param: string HTTP status code
param: string HTTP status text

getStatusCode()   X-Ref
Retrieves status code for the current web response.

return: string Status code

setHttpHeader($name, $value, $replace = true)   X-Ref
Sets a HTTP header.

param: string HTTP header name
param: string Value
param: boolean Replace for the value

getHttpHeader($name, $default = null)   X-Ref
Gets HTTP header current value.

return: array

hasHttpHeader($name)   X-Ref
Has a HTTP header.

return: boolean

setContentType($value)   X-Ref
Sets response content type.

param: string Content type

getContentType()   X-Ref
Gets response content type.

return: array

sendHttpHeaders()   X-Ref
Send HTTP headers and cookies.


sendContent()   X-Ref
Send content for the current web response.


normalizeHeaderName($name)   X-Ref
Retrieves a normalized Header.

param: string Header name
return: string Normalized header

getDate($timestamp, $type = 'rfc1123')   X-Ref
Retrieves a formated date.

param: string Timestamp
param: string Format type
return: string Formated date

addVaryHttpHeader($header)   X-Ref
Adds vary to a http header.

param: string HTTP header

addCacheControlHttpHeader($name, $value = null)   X-Ref
Adds an control cache http header.

param: string HTTP header
param: string Value for the http header

getHttpMetas()   X-Ref
Retrieves meta headers for the current web response.

return: string Meta headers

addHttpMeta($key, $value, $replace = true)   X-Ref
Adds meta headers to the current web response.

param: string Key to replace
param: string Value for the replacement
param: boolean Replace or not

getMetas()   X-Ref
Retrieves all meta headers for the current web response.

return: array List of meta headers

addMeta($key, $value, $replace = true, $escape = true)   X-Ref
Adds a meta header to the current web response.

param: string Name of the header
param: string Meta header to be set
param: boolean true if it's replaceable
param: boolean true for escaping the header

getTitle()   X-Ref
Retrieves title for the current web response.

return: string Title

setTitle($title, $escape = true)   X-Ref
Sets title for the current web response.

param: string Title name
param: boolean true, for escaping the title

getStylesheets($position = '')   X-Ref
Retrieves stylesheets for the current web response.

param: string Direcotry delimiter
return: string Stylesheets

addStylesheet($css, $position = '', $options = array()   X-Ref
Adds an stylesheet to the current web response.

param: string Stylesheet
param: string Direcotry delimiter
param: string Stylesheet options

getJavascripts($position = '')   X-Ref
Retrieves javascript code from the current web response.

param: string Directory delimiter
return: string Javascript code

addJavascript($js, $position = '')   X-Ref
Adds javascript code to the current web response.

param: string Javascript code
param: string Directory delimiter

getCookies()   X-Ref
Retrieves cookies from the current web response.

return: array Cookies

getHttpHeaders()   X-Ref
Retrieves HTTP headers from the current web response.

return: string HTTP headers

clearHttpHeaders()   X-Ref
Cleans HTTP headers from the current web response.


mergeProperties($response)   X-Ref
Copies a propertie to a new one.

param: sfResponse Response instance

__sleep()   X-Ref
Retrieves all objects handlers for the current web response.

return: array Objects instance

__wakeup()   X-Ref
Reconstructs any result that web response instance needs.


shutdown()   X-Ref
Executes the shutdown procedure.




Généré le : Fri Mar 16 22:42:14 2007 par Balluche grâce à PHPXref 0.7