class Sentry

Traits

Methods

void
initViewRenderers(array $aRenderers)

Set the view renderers data

from View
void
initViewNamespaces($aNamespaces, $sDefaultNamespace)

Set the view namespaces data

from View
object
getViewRenderer(string $sId = '')

Get the view renderer facade

from View
void
addViewRenderer(string $sId, Closure $xClosure)

Add a view renderer with an id

from View
object
getSessionManager()

Get the session manager

from Session
void
setSessionManager(Closure $xClosure)

Set the session manager

from Session
object
getPluginManager()

Get the plugin manager

from Manager
plugin(string $sName)

Get a registered response plugin

from Manager
object
getRequestManager()

Get the request manager

from Manager
object
getResponseManager()

Get the response manager

from Manager
void
addEventListener(EventListener $xEventListener)

Register an event listener.

from Manager
object
getResponse()

Get the Global Response object

from Manager
newResponse()

Create a new Jaxon response object

from Manager
void
triggerEvent(string $sEvent)

Trigger an event.

from Event
array
getEvents()

Return an array of events to listen to.

from Event
array
getSubscribedEvents()

Return an array of events to listen to.

from Event
string
getValidatorMessage()

Get the last error message

from Validator
bool
validateFunction(string $sName)

Validate a function name

from Validator
bool
validateEvent(string $sName)

Validate an event name

from Validator
bool
validateClass(string $sName)

Validate a class name

from Validator
bool
validateMethod(string $sName)

Validate a method name

from Validator
bool
validateUploadedFile(string $sName, array $aUploadedFile)

Validate an uploaded file

from Validator
void
setup()

Setup the library.

Response
ajaxResponse()

Get the Jaxon response.

void
addClassNamespace(string $sDirectory, string $sNamespace, string $sSeparator = '.', array $aProtected = array())

Add a class namespace.

void
setClassNamespaces(array $xAppConfig)

ASet the class namespaces.

void
addViewNamespace(string $sNamespace, string $sDirectory, string $sExtension, string $sRenderer)

Add a view namespace, and set the corresponding renderer.

void
setViewNamespaces(array $xAppConfig)

Set the view namespaces.

void
setLibraryOptions($bExtern, $bMinify, $sJsUri, $sJsDir)

Set the Jaxon library default options.

void
setInitCallback(callable $callable)

Set the init callback, used to initialise class instances.

void
setBeforeCallback(callable $callable)

Set the pre-request processing callback.

void
setAfterCallback(callable $callable)

Set the post-request processing callback.

void
setInvalidCallback(callable $callable)

Set the processing error callback.

void
setErrorCallback(callable $callable)

Set the processing exception callback.

Armada|null
instance(string $classname)

Get a class instance.

Request|null
request(string $classname)

Get a Jaxon request to a given class.

Response
onEventBefore(boolean $bEndRequest)

This is the pre-request processing callback passed to the Jaxon library.

Response
onEventAfter()

This is the post-request processing callback passed to the Jaxon library.

Response
onEventInvalid($sMessage)

This callback is called whenever an invalid request is processed.

Response
onEventError(Exception $e)

This callback is called whenever an invalid request is processed.

void
processRequest()

Process the current Jaxon request.

Details

in View at line line 26
void initViewRenderers(array $aRenderers)

Set the view renderers data

Parameters

array $aRenderers Array of renderer names with namespace as key

Return Value

void

in View at line line 38
void initViewNamespaces($aNamespaces, $sDefaultNamespace)

Set the view namespaces data

Parameters

$aNamespaces
$sDefaultNamespace

Return Value

void

in View at line line 50
object getViewRenderer(string $sId = '')

Get the view renderer facade

Parameters

string $sId The unique identifier of the view renderer

Return Value

object The view renderer

in View at line line 63
void addViewRenderer(string $sId, Closure $xClosure)

Add a view renderer with an id

Parameters

string $sId The unique identifier of the view renderer
Closure $xClosure A closure to create the view instance

Return Value

void

in Session at line line 24
object getSessionManager()

Get the session manager

Return Value

object The session manager

in Session at line line 36
void setSessionManager(Closure $xClosure)

Set the session manager

Parameters

Closure $xClosure A closure to create the session instance

Return Value

void

in Manager at line line 27
object getPluginManager()

Get the plugin manager

Return Value

object The plugin manager

in Manager at line line 39
Response plugin(string $sName)

Get a registered response plugin

Parameters

string $sName The name of the plugin

Return Value

Response

in Manager at line line 49
object getRequestManager()

Get the request manager

Return Value

object The request manager

in Manager at line line 59
object getResponseManager()

Get the response manager

Return Value

object The response manager

in Manager at line line 69
void addEventListener(EventListener $xEventListener)

Register an event listener.

Parameters

EventListener $xEventListener

Return Value

void

in Manager at line line 79
object getResponse()

Get the Global Response object

Return Value

object The Global Response object

in Manager at line line 89
Response newResponse()

Create a new Jaxon response object

Return Value

Response The new Jaxon response object

in Event at line line 26
void triggerEvent(string $sEvent)

Trigger an event.

Parameters

string $sEvent The event name

Return Value

void

in Event at line line 38
array getEvents()

Return an array of events to listen to.

This is the default implementation on the EventListener interface.

Return Value

array An empty array

in Event at line line 50
array getSubscribedEvents()

Return an array of events to listen to.

This is the implementation of the Lemon\Event\EventSubscriberInterface interface.

Return Value

array The event names to listen to

in Validator at line line 24
string getValidatorMessage()

Get the last error message

Return Value

string The last error message

in Validator at line line 36
bool validateFunction(string $sName)

Validate a function name

Parameters

string $sName The function name

Return Value

bool True if the function name is valid, and false if not

in Validator at line line 48
bool validateEvent(string $sName)

Validate an event name

Parameters

string $sName The event name

Return Value

bool True if the event name is valid, and false if not

in Validator at line line 60
bool validateClass(string $sName)

Validate a class name

Parameters

string $sName The class name

Return Value

bool True if the class name is valid, and false if not

in Validator at line line 72
bool validateMethod(string $sName)

Validate a method name

Parameters

string $sName The function name

Return Value

bool True if the method name is valid, and false if not

in Validator at line line 85
bool validateUploadedFile(string $sName, array $aUploadedFile)

Validate an uploaded file

Parameters

string $sName The uploaded file variable name
array $aUploadedFile The file data received in the $_FILES array

Return Value

bool True if the file data are valid, and false if not

at line line 40
void setup()

Setup the library.

Return Value

void

at line line 66
Response ajaxResponse()

Get the Jaxon response.

Return Value

Response

at line line 81
void addClassNamespace(string $sDirectory, string $sNamespace, string $sSeparator = '.', array $aProtected = array())

Add a class namespace.

Parameters

string $sDirectory The path to the directory
string $sNamespace The associated namespace
string $sSeparator The character to use as separator in javascript class names
array $aProtected The functions that are not to be exported

Return Value

void

at line line 99
void setClassNamespaces(array $xAppConfig)

ASet the class namespaces.

Parameters

array $xAppConfig The application config options

Return Value

void

at line line 144
void addViewNamespace(string $sNamespace, string $sDirectory, string $sExtension, string $sRenderer)

Add a view namespace, and set the corresponding renderer.

Parameters

string $sNamespace The namespace name
string $sDirectory The namespace directory
string $sExtension The extension to append to template names
string $sRenderer The corresponding renderer name

Return Value

void

at line line 169
void setViewNamespaces(array $xAppConfig)

Set the view namespaces.

Parameters

array $xAppConfig The application config options

Return Value

void

at line line 199
void setLibraryOptions($bExtern, $bMinify, $sJsUri, $sJsDir)

Set the Jaxon library default options.

Parameters

$bExtern
$bMinify
$sJsUri
$sJsDir

Return Value

void

at line line 234
void setInitCallback(callable $callable)

Set the init callback, used to initialise class instances.

Parameters

callable $callable The callback function

Return Value

void

at line line 246
void setBeforeCallback(callable $callable)

Set the pre-request processing callback.

Parameters

callable $callable The callback function

Return Value

void

at line line 258
void setAfterCallback(callable $callable)

Set the post-request processing callback.

Parameters

callable $callable The callback function

Return Value

void

at line line 270
void setInvalidCallback(callable $callable)

Set the processing error callback.

Parameters

callable $callable The callback function

Return Value

void

at line line 282
void setErrorCallback(callable $callable)

Set the processing exception callback.

Parameters

callable $callable The callback function

Return Value

void

at line line 315
Armada|null instance(string $classname)

Get a class instance.

Parameters

string $classname the class name

Return Value

Armada|null The registered instance of the class

at line line 336
Request|null request(string $classname)

Get a Jaxon request to a given class.

Parameters

string $classname the class name

Return Value

Request|null The request to the class

at line line 349
Response onEventBefore(boolean $bEndRequest)

This is the pre-request processing callback passed to the Jaxon library.

Parameters

boolean $bEndRequest &$bEndRequest if set to true, the request processing is interrupted.

Return Value

Response the Jaxon response

at line line 385
Response onEventAfter()

This is the post-request processing callback passed to the Jaxon library.

Return Value

Response the Jaxon response

at line line 399
Response onEventInvalid($sMessage)

This callback is called whenever an invalid request is processed.

Parameters

$sMessage

Return Value

Response the Jaxon response

at line line 413
Response onEventError(Exception $e)

This callback is called whenever an invalid request is processed.

Parameters

Exception $e

Return Value

Response the Jaxon response

at line line 431
void processRequest()

Process the current Jaxon request.

Return Value

void