Phpr_Response class
Defined in |
/phproad/modules/phpr/classes/phpr_response.php, lines 12-304 |
Author |
LemonStand eCommerce Inc. |
Represents the application HTTP response.
An instance of this class is always available through the $Phpr class and you never need to create it manually:
Phpr::$response->redirect('http://google.com');
Method details
¶
ajaxReportException() method
public void ajaxReportException(mixed $exception, boolean $html=false, boolean $focus=false)
$exception |
mixed |
specifies the exception object or message. |
$html |
boolean |
determines whether the response message should be in HTML format. |
$focus |
boolean |
determines whether the focusing Java Script code must be added to the response.
This parameter will work only if $exception is a Phpr_ValidationException object |
Sends AJAX response with information about exception.
Note that this method terminates the script execution.
¶
deleteCookie() method
public void deleteCookie(string $name, string $path='/', string $domain='', string $Secure=false)
$name |
string |
specifies a name of the cookie. |
$path |
string |
specifies the path on the server |
$domain |
string |
specifies a domain that the cookie is available to. |
$Secure |
string |
indicates that the cookie should only be transmitted over a secure HTTPS connection. |
Deletes a cookie.
¶
redirect() method
public void redirect(string $url, boolean $send_301_header=false)
$url |
string |
specifies the target URL. |
$send_301_header |
boolean |
determines whether HTTP header 301 Moved Permanently should be sent. |
Redirects the browser to a specific URL.
Note that this method terminates the script execution.
¶
setCookie() method
public void setCookie(string $name, string $value, string $expire=0, string $path='/', string $domain='', string $secure=NULL)
$name |
string |
specifies the name of the cookie. |
$value |
string |
specifies the cookie value. |
$expire |
string |
specifies a time the cookie expires, in days. |
$path |
string |
specifies the path on the server in which the cookie will be available on. |
$domain |
string |
specifies a domain that the cookie is available to. |
$secure |
string |
indicates that the cookie should only be transmitted over a secure HTTPS connection. |
Sends a cookie.
|