class Manager

Traits

Constants

RESPONSE_TYPE

The response type.

Methods

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
string
getVersion()

Get the Jaxon library version number

from Config
void
setOption(string $sName, mixed $sValue)

Set the value of a config option

from Config
void
setOptions(array $aOptions, string $sKeys = '')

Set the values of an array of config options

from Config
mixed
getOption(string $sName, mixed $xDefault = null)

Get the value of a config option

from Config
bool
hasOption(string $sName)

Check the presence of a config option

from Config
array
getOptionNames(string $sPrefix)

Get the names of the options matching a given prefix

from Config
Config
newConfig()

Create a new the config manager

from Config
void
setCacheDir(string $sCacheDir)

Set a cache directory for the template engine

from Cache
boolean
minify(string $sJsFile, string $sMinFile)

Minify javascript code

from Minifier
string
render(string $sTemplate, array $aVars = array())

Render a template

from Template
void
addViewNamespace(string $sNamespace, string $sDirectory, string $sExtension = '')

Add a namespace to the template system

from Template
string
trans(string $sText, array $aPlaceHolders = array(), string $sLanguage = null)

Get a translated string

__construct()

Initialize the Jaxon Plugin Manager

void
useComposerAutoloader()

Use the Composer autoloader

void
disableAutoload()

Disable the autoloader in the library

void
setConfirm(Confirm $xConfirm)

Set the javascript confirm function

getConfirm()

Get the javascript confirm function

getDefaultConfirm()

Get the default javascript confirm function

void
setAlert(Alert $xAlert)

Set the javascript alert function

getAlert()

Get the javascript alert function

getDefaultAlert()

Get the default javascript alert function

void
registerPlugin(Plugin $xPlugin, integer $nPriority = 1000)

Register a plugin

boolean
canProcessRequest()

Check if the current request can be processed

boolean
processRequest()

Process the current request

mixed
register(array $aArgs)

Register a function, event or callable object

boolean
addClassDir(string $sDirectory, string|null $sNamespace = '', string $sSeparator = '.', array $aProtected = array())

Add a path to the class directories

void
registerClasses(array $aOptions = array())

Register callable objects from all class directories

bool
registerClass(string $sClassName, array $aOptions = array())

Register an instance of a given class

object
getRegisteredObject(string $sClassName)

Find a user registered callable object by class name

boolean
canExportJavascript()

Check if the javascript code generated by Jaxon can be exported to an external file

string
getJs()

Get the HTML tags to include Jaxon javascript files into the page

string
getCss()

Get the HTML tags to include Jaxon CSS code and files into the page

string
getScript()

Get the javascript code to be sent to the browser

getResponsePlugin(string $sName)

Find the specified response plugin by name and return a reference to it if one exists

getRequestPlugin(string $sName)

Find the specified request plugin by name and return a reference to it if one exists

Details

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 Config at line line 24
string getVersion()

Get the Jaxon library version number

Return Value

string The version number

in Config at line line 37
void setOption(string $sName, mixed $sValue)

Set the value of a config option

Parameters

string $sName The option name
mixed $sValue The option value

Return Value

void

in Config at line line 50
void setOptions(array $aOptions, string $sKeys = '')

Set the values of an array of config options

Parameters

array $aOptions The config options
string $sKeys The keys of the options in the array

Return Value

void

in Config at line line 63
mixed getOption(string $sName, mixed $xDefault = null)

Get the value of a config option

Parameters

string $sName The option name
mixed $xDefault The default value, to be returned if the option is not defined

Return Value

mixed The option value, or null if the option is unknown

in Config at line line 75
bool hasOption(string $sName)

Check the presence of a config option

Parameters

string $sName The option name

Return Value

bool True if the option exists, and false if not

in Config at line line 87
array getOptionNames(string $sPrefix)

Get the names of the options matching a given prefix

Parameters

string $sPrefix The prefix to match

Return Value

array The options matching the prefix

in Config at line line 97
Config newConfig()

Create a new the config manager

Return Value

Config The config manager

in Cache at line line 28
void setCacheDir(string $sCacheDir)

Set a cache directory for the template engine

Parameters

string $sCacheDir The cache directory

Return Value

void

in Minifier at line line 27
boolean minify(string $sJsFile, string $sMinFile)

Minify javascript code

Parameters

string $sJsFile The javascript file to be minified
string $sMinFile The minified javascript file

Return Value

boolean True if the file was minified

in Template at line line 27
string render(string $sTemplate, array $aVars = array())

Render a template

Parameters

string $sTemplate The name of template to be rendered
array $aVars The template vars

Return Value

string The template content

in Template at line line 41
void addViewNamespace(string $sNamespace, string $sDirectory, string $sExtension = '')

Add a namespace to the template system

Parameters

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

Return Value

void

in Translator at line line 30
string trans(string $sText, array $aPlaceHolders = array(), string $sLanguage = null)

Get a translated string

Parameters

string $sText The key of the translated string
array $aPlaceHolders The placeholders of the translated string
string $sLanguage The language of the translated string

Return Value

string The translated string

at line line 119
__construct()

Initialize the Jaxon Plugin Manager

at line line 143
void useComposerAutoloader()

Use the Composer autoloader

Return Value

void

at line line 156
void disableAutoload()

Disable the autoloader in the library

The user shall provide an alternative autoload system.

Return Value

void

at line line 169
void setConfirm(Confirm $xConfirm)

Set the javascript confirm function

Parameters

Confirm $xConfirm The javascript confirm function

Return Value

void

at line line 179
Confirm getConfirm()

Get the javascript confirm function

Return Value

Confirm

at line line 189
Confirm getDefaultConfirm()

Get the default javascript confirm function

Return Value

Confirm

at line line 201
void setAlert(Alert $xAlert)

Set the javascript alert function

Parameters

Alert $xAlert The javascript alert function

Return Value

void

at line line 211
Alert getAlert()

Get the javascript alert function

Return Value

Alert

at line line 221
Alert getDefaultAlert()

Get the default javascript alert function

Return Value

Alert

at line line 261
void registerPlugin(Plugin $xPlugin, integer $nPriority = 1000)

Register a plugin

Below is a table for priorities and their description: - 0 thru 999: Plugins that are part of or extensions to the jaxon core - 1000 thru 8999: User created plugins, typically, these plugins don't care about order - 9000 thru 9999: Plugins that generally need to be last or near the end of the plugin list

Parameters

Plugin $xPlugin An instance of a plugin
integer $nPriority The plugin priority, used to order the plugins

Return Value

void

at line line 321
boolean canProcessRequest()

Check if the current request can be processed

Calls each of the request plugins and determines if the current request can be processed by one of them. If no processor identifies the current request, then the request must be for the initial page load.

Return Value

boolean

at line line 341
boolean processRequest()

Process the current request

Calls each of the request plugins to request that they process the current request. If any plugin processes the request, it will return true.

Return Value

boolean

at line line 371
mixed register(array $aArgs)

Register a function, event or callable object

Call each of the request plugins and give them the opportunity to handle the registration of the specified function, event or callable object.

Parameters

array $aArgs The registration data

Return Value

mixed

at line line 394
boolean addClassDir(string $sDirectory, string|null $sNamespace = '', string $sSeparator = '.', array $aProtected = array())

Add a path to the class directories

Parameters

string $sDirectory The path to the directory
string|null $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

boolean

at line line 502
void registerClasses(array $aOptions = array())

Register callable objects from all class directories

Parameters

array $aOptions The options to register the classes with

Return Value

void

at line line 560
bool registerClass(string $sClassName, array $aOptions = array())

Register an instance of a given class

Parameters

string $sClassName The name of the class to be registered
array $aOptions The options to register the class with

Return Value

bool

at line line 617
object getRegisteredObject(string $sClassName)

Find a user registered callable object by class name

Parameters

string $sClassName The class name of the callable object

Return Value

object

at line line 667
boolean canExportJavascript()

Check if the javascript code generated by Jaxon can be exported to an external file

Return Value

boolean

at line line 706
string getJs()

Get the HTML tags to include Jaxon javascript files into the page

Return Value

string

at line line 745
string getCss()

Get the HTML tags to include Jaxon CSS code and files into the page

Return Value

string

at line line 885
string getScript()

Get the javascript code to be sent to the browser

Also call each of the request plugins giving them the opportunity to output some javascript to the page being generated. This is called only when the page is being loaded initially. This is not called when processing a request.

Return Value

string

at line line 936
Response getResponsePlugin(string $sName)

Find the specified response plugin by name and return a reference to it if one exists

Parameters

string $sName The name of the plugin

Return Value

Response

at line line 952
Request getRequestPlugin(string $sName)

Find the specified request plugin by name and return a reference to it if one exists

Parameters

string $sName The name of the plugin

Return Value

Request