Web_Page_View __construct(
Web_Page
$page, [string
$name = 'default']
)
|
|
Constructor
Parameters:
|
Web_Page |
$page: |
Page tha view is for |
|
string |
$name: |
Name of the view |
Redefined in descendants as:
void add_exports(
$exports
)
|
|
Adds exports
Parameters:
API Tags:
Redefined in descendants as:
void add_http_header(
unknown_type
$http_header
)
|
|
Adds HTTP header
Parameters:
|
unknown_type |
$http_header: |
|
API Tags:
Redefined in descendants as:
Returns page HTML
API Tags:
Redefined in descendants as:
mixed get_exported_value(
string
$key, [boolean
$forgiving = true]
)
|
|
Returns value of exported pair.
If $forgiving is set to false will throw exception TE_Key_Not_Exists if such key does not exist. If $forgiving is set to true will return NULL if such key does not exist.
Parameters:
|
string |
$key: |
|
|
boolean |
$forgiving: |
|
API Tags:
array get_http_headers(
)
|
|
Return HTTP headers
API Tags:
Redefined in descendants as:
Returns view name
API Tags:
void set_exported_value(
string
$key, mixed
$value, [
$create_if_not_exist = false], boolean
$create_if_not_exists
)
|
|
Changes the value of exported pair.
If $create_if_not_exists is set to true this function will create export pair if it does not exist. If $create_if_not_exists is set to false exception will be thrown if pair does not exist.
The purpose of methods set_exported_value and get_exported_value is to give chance to the view class to format values. For example, if Page object exported 'total' => 0.54, view object can use number_format() function to change the appearance of the value (first it will get value with $var = get_exported_value('some_key'), then will set_exported_value('some_key', number_format($var, 2, ','))).
Parameters:
|
string |
$key: |
|
|
mixed |
$value: |
|
|
boolean |
$create_if_not_exists: |
|
|
|
$create_if_not_exist: |
|
API Tags:
Information Tags:
| Throws: | TE_Key_Not_Exists |
void set_exports(
$exports
)
|
|
Sets TPLE exports
Parameters:
API Tags:
Redefined in descendants as:
void set_name(
unknown_type
$name
)
|
|
Sets name of the view
Parameters:
API Tags:
| Internal: | |
| Access: | private |
Shows page HTML
API Tags:
Redefined in descendants as: