Documentation

Site

An interface defining a Site Sites provide a single, unified application context throughout the execution of the application, providing state information to components, and allowing them to alter the flow of the application without direct knowledge of the inner workings of the other components.

Tags
author

Jason Savell jsavell@library.tamu.edu

Table of Contents

Methods

addSystemMessage()  : void
Push a new message string to the Site's system messages
getControllerClass()  : string
Get the Controller class associated with the given name
getCurrentPage()  : SitePage
Gets the currently requested page
getGlobalUser()  : User
Get a representation of the application user associated with a request.
getPages()  : array<string|int, SitePage>
Get the pages defined for the Site.
getSanitizedInputData()  : array<string|int, mixed>
Provide a sanitized and secured version of user input data (POST,GET,COOKIE,etc) to components All components should access user input data exclusively through this method.
getSiteConfig()  : array<string|int, mixed>
Returns the site configuration
getSystemMessages()  : array<string|int, SystemMessage>
Get the Site's SystemMessages
getViewRenderer()  : ViewRenderer
Get the ViewRenderer. Components like Controllers can access this method to configure the set ViewRenderer.
hasRedirectUrl()  : bool
redirect()  : void
setRedirectUrl()  : void
Define a redirect URL.
setViewRenderer()  : void
Set the ViewRenderer.

Methods

addSystemMessage()

Push a new message string to the Site's system messages

public addSystemMessage(string $message, string $type) : void
Parameters
$message : string

The message

$type : string

The type of the message

getControllerClass()

Get the Controller class associated with the given name

public getControllerClass(string $controllerName) : string
Parameters
$controllerName : string
Return values
string

$controllerClass An instantiable string representation of the Controller class name

getCurrentPage()

Gets the currently requested page

public getCurrentPage() : SitePage
Return values
SitePage

The currently requested SitePage

getGlobalUser()

Get a representation of the application user associated with a request.

public getGlobalUser() : User
Return values
User

getPages()

Get the pages defined for the Site.

public getPages() : array<string|int, SitePage>
Return values
array<string|int, SitePage>

getSanitizedInputData()

Provide a sanitized and secured version of user input data (POST,GET,COOKIE,etc) to components All components should access user input data exclusively through this method.

public getSanitizedInputData() : array<string|int, mixed>
Return values
array<string|int, mixed>

getSiteConfig()

Returns the site configuration

public getSiteConfig() : array<string|int, mixed>
Return values
array<string|int, mixed>

$siteConfig

getSystemMessages()

Get the Site's SystemMessages

public getSystemMessages() : array<string|int, SystemMessage>
Return values
array<string|int, SystemMessage>

getViewRenderer()

Get the ViewRenderer. Components like Controllers can access this method to configure the set ViewRenderer.

public getViewRenderer() : ViewRenderer
Return values
ViewRenderer

The currently set ViewRenderer

hasRedirectUrl()

public hasRedirectUrl() : bool
Return values
bool

redirect()

public redirect() : void

setRedirectUrl()

Define a redirect URL.

public setRedirectUrl(string $redirectUrl) : void
Parameters
$redirectUrl : string

        
On this page

Search results