Home  Support  API

IWebResponse Interface Reference
[Web]


Response interface for application that run at web-server.

Definition at line 24 of file IWebResponse.class.php.

Inheritance diagram for IWebResponse:
Inheritance graph

List of all members.

Public Member Functions

 addHeader ($header, $value)
 Appends the header to be sent to client within the response.
 addHeaders (array $headers)
 Adds the list of headers to be sent to client within the response.
 finish ()
 Finishes the request by passing the response to the client and closes a connection.
 getHeaders ()
 Gets the list of headers that are ready to be sent within the response.
 isFinished ()
 Checks whether response is finished.
 isHeadersSent ()
 Checks whether response headers are already sent.
 redirect (HttpUrl $url)
 Sends the redirect.
 setStatus (HttpStatus $status)
 Sets the status of the respose.
 write ($string)
 Writes the string to the source.
 writeFile ($filepath)
 Writes the contents of the file to the response.

Member Function Documentation

IWebResponse::addHeader ( header,
value 
)

Appends the header to be sent to client within the response.

Parameters:
string $header name of the header
string $value value of the header
Returns:
IWebResponse itself

Implemented in WebResponse.

IWebResponse::addHeaders ( array $  headers  ) 

Adds the list of headers to be sent to client within the response.

Parameters:
array $headers associative key=>value array of headers, where key is the name of the header
Returns:
IWebResponse

Implemented in WebResponse.

IAppResponse::finish (  )  [inherited]

Finishes the request by passing the response to the client and closes a connection.

This can be useful when the script should do a task that does not depend on the response.

Returns:
void

Implemented in WebResponse.

IWebResponse::getHeaders (  ) 

Gets the list of headers that are ready to be sent within the response.

Returns:
array

Implemented in WebResponse.

IAppResponse::isFinished (  )  [inherited]

Checks whether response is finished.

Returns:
boolean

Implemented in WebResponse.

IWebResponse::isHeadersSent (  ) 

Checks whether response headers are already sent.

Returns:
boolean

Implemented in WebResponse.

IWebResponse::redirect ( HttpUrl url  ) 

Sends the redirect.

Note that this function does not close the connection and terminates the execution.

Parameters:
HttpUrl $url the redirection dest.
Returns:
void

Implemented in WebResponse.

IWebResponse::setStatus ( HttpStatus status  ) 

Sets the status of the respose.

Parameters:
HttpStatus $status status to be set
Returns:
IWebResponse

Implemented in WebResponse.

IOutput::write ( string  )  [inherited]

Writes the string to the source.

Parameters:
string $string string to be appended to the source
Returns:
IOutput itself

Implemented in WebResponse, TempFile, FileWriteStream, and MemoryStream.

Referenced by SqlSchemaConstructor::make(), UIPage::render(), and UIPhpLayoutPresentation::render().

IWebResponse::writeFile ( filepath  ) 

Writes the contents of the file to the response.

This method is WebResponse::write() optimized for files.

Returns:
void

Implemented in WebResponse.


The documentation for this interface was generated from the following file: