Packages

  • Nette
    • Application
    • Caching
    • Collections
    • Config
    • Forms
    • IO
    • Loaders
    • Mail
    • Reflection
    • Security
    • Templates
    • Web
  • None
  • PHP

Classes

  • NFtp
  • NHtml
  • NHttpContext
  • NHttpRequest
  • NHttpResponse
  • NHttpUploadedFile
  • NSession
  • NSessionNamespace
  • NUri
  • NUriScript
  • NUser

Interfaces

  • IHttpRequest
  • IHttpResponse
  • IUser

Exceptions

  • NFtpException
  • Overview
  • Package
  • Class
  • Tree
  • Other releases

Interface IHttpResponse

IHttpResponse interface.

Direct known implementers

NHttpResponse
Package: Nette\Web
Author: David Grudl
Located at Web/IHttpResponse.php
Methods summary
public
# setCode( integer $code )

Sets HTTP response code.

Sets HTTP response code.

Parameters

$code
integer
public integer
# getCode( )

Returns HTTP response code.

Returns HTTP response code.

Returns

integer
public
# setHeader( string $name, string $value )

Sends a HTTP header and replaces a previous one.

Sends a HTTP header and replaces a previous one.

Parameters

$name
string
header name
$value
string
header value
public
# addHeader( string $name, string $value )

Adds HTTP header.

Adds HTTP header.

Parameters

$name
string
header name
$value
string
header value
public
# setContentType( string $type, string $charset = NULL )

Sends a Content-type HTTP header.

Sends a Content-type HTTP header.

Parameters

$type
string
mime-type
$charset
string
charset
public
# redirect( string $url, integer $code = IHttpResponse::S302_FOUND )

Redirects to a new URL.

Redirects to a new URL.

Parameters

$url
string
URL
$code
integer
HTTP code
public
# setExpiration( mixed $seconds )

Sets the number of seconds before a page cached on a browser expires.

Sets the number of seconds before a page cached on a browser expires.

Parameters

$seconds
mixed
timestamp or number of seconds
public boolean
# isSent( )

Checks if headers have been sent.

Checks if headers have been sent.

Returns

boolean
public array
# getHeaders( )

Returns a list of headers to sent.

Returns a list of headers to sent.

Returns

array
public
# setCookie( string $name, string $value, mixed $expire, string $path = NULL, string $domain = NULL, boolean $secure = NULL )

Sends a cookie.

Sends a cookie.

Parameters

$name
string
name of the cookie
$value
string
value
$expire
mixed
expiration as unix timestamp or number of seconds; Value 0 means "until the browser is closed"
$path
string
$domain
string
$secure
boolean
public
# deleteCookie( string $name, string $path = NULL, string $domain = NULL, boolean $secure = NULL )

Deletes a cookie.

Deletes a cookie.

Parameters

$name
string
name of the cookie.
$path
string
$domain
string
$secure
boolean
Constants summary
integer PERMANENT 2116333333
#

cookie expiration: forever (23.1.2037)

cookie expiration: forever (23.1.2037)

integer BROWSER 0
#

cookie expiration: until the browser is closed

cookie expiration: until the browser is closed

integer S200_OK 200
#

HTTP 1.1 response code

HTTP 1.1 response code

integer S204_NO_CONTENT 204
#

HTTP 1.1 response code

HTTP 1.1 response code

integer S300_MULTIPLE_CHOICES 300
#

HTTP 1.1 response code

HTTP 1.1 response code

integer S301_MOVED_PERMANENTLY 301
#

HTTP 1.1 response code

HTTP 1.1 response code

integer S302_FOUND 302
#

HTTP 1.1 response code

HTTP 1.1 response code

integer S303_SEE_OTHER 303
#

HTTP 1.1 response code

HTTP 1.1 response code

integer S303_POST_GET 303
#

HTTP 1.1 response code

HTTP 1.1 response code

integer S304_NOT_MODIFIED 304
#

HTTP 1.1 response code

HTTP 1.1 response code

integer S307_TEMPORARY_REDIRECT 307
#

HTTP 1.1 response code

HTTP 1.1 response code

integer S400_BAD_REQUEST 400
#

HTTP 1.1 response code

HTTP 1.1 response code

integer S401_UNAUTHORIZED 401
#

HTTP 1.1 response code

HTTP 1.1 response code

integer S403_FORBIDDEN 403
#

HTTP 1.1 response code

HTTP 1.1 response code

integer S404_NOT_FOUND 404
#

HTTP 1.1 response code

HTTP 1.1 response code

integer S405_METHOD_NOT_ALLOWED 405
#

HTTP 1.1 response code

HTTP 1.1 response code

integer S410_GONE 410
#

HTTP 1.1 response code

HTTP 1.1 response code

integer S500_INTERNAL_SERVER_ERROR 500
#

HTTP 1.1 response code

HTTP 1.1 response code

integer S501_NOT_IMPLEMENTED 501
#

HTTP 1.1 response code

HTTP 1.1 response code

integer S503_SERVICE_UNAVAILABLE 503
#

HTTP 1.1 response code

HTTP 1.1 response code

Nette Framework 0.9.7 (for PHP 5.2) API documentation generated by ApiGen 2.3.0