- 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 class FrontendPage extends XSLTPage
class.frontendpage.php #18The FrontendPage
class represents a page of the website that is powered
by Symphony. It takes the current URL and resolves it to a page as specified
in Symphony which involves deducing the parameters from the URL, ensuring
this page is accessible and exists, setting the correct Content-Type for the page
and executing any Datasources or Events attached to the page to generate a
string of HTML that is returned to the browser. If the resolved page does not exist
or the user is not allowed to view it, the appropriate 404/403 page will be shown
instead.
Properties
array $_param
An associative array of all the parameters for this page including Symphony parameters, URL Parameters, DS Parameters and Page parameters
Methods
array Env()
Accessor function for the environment variables, aka $this->_env
string Page()
Accessor function for this current page URL, $this->_page
array Params()
Accessor function for the current page params, $this->_param
void __construct()
Constructor function sets the $is_logged_in
variable.
string generate(
$page)
This function is called immediately from the Frontend class passing the current URL for generation. Generate will resolve the URL to the specific page in the Symphony and then execute all events and datasources registered to this page so that it can be rendered. A number of delegates are fired during stages of execution for extensions to hook into.
Uses
Parameters
Returns
The page source after the XSLT has transformed this page's XML. This would be exactly the same as the 'view-source' from your browser
See Also
array pageData()
Accessor function for the resolved page's data ($this->_pageData
)
as it lies in tbl_pages
void processDatasources(XMLElement $wrapper, $params)
$datasources,
Given an array of all the Datasources for this page, sort them into the
correct execution order and append the Datasource results to the
page XML. If the Datasource provides any parameters, they will be
added to the $env
pool for use by other Datasources and eventual
inclusion into the page parameters.
Parameters
array resolvePage(
$page)
This function attempts to resolve the given page in to it's Symphony page. If no
page is given, it is assumed the 'index' is being requested. Before a page row is
returned, it is checked to see that if it has the 'admin' type, that the requesting
user is authenticated as a Symphony author. If they are not, the Symphony 403
page is returned (whether that be set as a user defined page using the page type
of 403, or just returning the Default Symphony 403 error page). Any URL parameters
set on the page are added to the $env
variable before the function returns an
associative array of page details such as Title, Content Type etc.
Uses
Parameters
Returns
An associative array of page details
See Also
static string sanitizeParameter(
$parameter)
Given a string (expected to be a URL parameter) this function will ensure it is safe to embed in an XML document.
Parameters
Returns
The sanitized string
void setEnv(
$env)
Setter function for $this->_env
, which takes an associative array
of environment information and replaces the existing $this->_env
.