- Symphony 2.7.6
-
› assets
14 -
› boot
15 -
› core
24 -
› cryptography
4 -
› data-sources
6 -
› email-gateways
3 -
› events
3 -
› global
61 -
› interface
9 -
› toolkit
60 - Delegates101
- Deprecated28
Versions
- 2.7.9
- 2.7.8
- 2.7.7
- 2.7.6
- 2.7.5
- 2.7.3
- 2.7.2
- 2.7.10
- 2.7.1
- 2.7.0
- 2.6.9
- 2.6.8
- 2.6.7
- 2.6.6
- 2.6.5
- 2.6.4
- 2.6.3
- 2.6.2
- 2.6.11
- 2.6.10
- 2.6.1
- 2.6.0
- 2.5.3
- 2.5.2
- 2.5.1
- 2.5.0
- 2.4
- 2.3.6
- 2.3.5
- 2.3.4
- 2.3.3
- 2.3.2
- 2.3.1
- 2.3
- 2.2.5
- 2.2.4
- 2.2.3
- 2.2.2
- 2.2.1
- 2.2
Options
public abstract class Page
class.page.php #9Page is an abstract class that holds an object representation of a page's headers.
Constants
static integer HTTP_NOT_MODIFIED = 304
Refers to the HTTP status code, 304 Not Modified
static integer HTTP_STATUS_BAD_REQUEST = 400
Refers to the HTTP status code, 400 Bad Request
static integer HTTP_STATUS_ERROR = 500
Refers to the HTTP status code, 500 Internal Server Error
static integer HTTP_STATUS_FORBIDDEN = 403
Refers to the HTTP status code, 403 Forbidden
static integer HTTP_STATUS_FOUND = 302
Refers to the HTTP status code, 302 Found This is used as a temporary redirect
static integer HTTP_STATUS_MOVED_PERMANENT = 301
Refers to the HTTP status code, 301 Moved Permanently
static integer HTTP_STATUS_NOT_FOUND = 404
Refers to the HTTP status code, 404 Not Found
static integer HTTP_STATUS_OK = 200
Refers to the HTTP status code, 200 OK
static integer HTTP_STATUS_UNAUTHORIZED = 401
Refers to the HTTP status code, 401 Unauthorized
Properties
static array $HTTP_STATUSES
Keyed array of all the string
Methods
void __construct()
Initialises the Page object by setting the headers to empty
void addHeaderToPage(
$name, $value, $response_code)
Adds a header to the $_headers array using the $name as the key.
Parameters
void generate(
$page)
This function calls __renderHeaders()
.
See Also
static string getHeaderStatusString(
$status_code)
This method format the provided $status_code
to used
php's header()
function.
Parameters
Returns
The formatted HTTP Status string
integer getHttpStatusCode()
Gets the current HTTP Status. If none is set, it assumes HTTPSTATUSOK
static array|string getHttpStatusValue(
$status_code)
This method returns the string HTTP Status value.
If $status_code
is null, it returns all the values
currently registered.
Parameters
Returns
Returns string if the $status_code is not null. Array otherwise
See Also
array headers()
Accessor function for $_headers
void isRequestValid()
This function will check to ensure that this post request is not larger than what the server is set to handle. If it is, a notice is shown.
See Also
void removeHeaderFromPage(
$name)
Removes a header from the $_headers array using the $name as the key.
Parameters
static void renderStatusCode(
$status_code)
This method calls php's header()
function
in order to set the HTTP status code properly on all platforms.
See Also
void setHttpStatus(
$status_code)
Shorthand for addHeaderToPage
in order to set the
HTTP Status header.
Parameters
static void setHttpStatusValue(
$status_code, $string_value)
Sets the $sting_value
for the specified $status_code
.
If $sting_value
is null, the $status_code
is removed from
the array.
This allow developers to register customs HTTP_STATUS into the
static Page::$HTTP_STATUSES
array and use $page->setHttpStatus()
.