- Symphony 2.2.1
-
› boot
9 -
› core
22 -
› email-gateways
3 -
› toolkit
66 -
› Unknown
33 - Delegates83
- Deprecated30
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 #23The 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
DatasourceManager $DatasourceManager
An instance of the DatasourceManager
EventManager $EventManager
An instance of the EventManager
ExtensionManager $ExtensionManager
An instance of the ExtensionManager
Frontend $_Parent
An instance of the Frontend class
See Also
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
void __construct(Frontend $parent)
Constructor function sets $this->_Parent
and initialises the Managers
used on the FrontendPage, which are DatasourceManager, EventManager and
ExtensionManager
Parameters
static array fetchPageTypes(
$page_id)
Given a page ID, return it's type from tbl_pages
Parameters
Returns
An array of types that this page is set as
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 resolvePageFileLocation(
$path, $handle)
Resolves the path to this page's XSLT file. The Symphony convention
is that they are stored in the PAGES
folder. If this page has a parent
it will be as if all the / in the URL have been replaced with _. ie.
/articles/read/ will produce a file articles_read.xsl
Parameters
Returns
The path to the XSLT of this page