class Plugin extends Response

Traits

Methods

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

Return init script for the Jaxon JQuery plugin.

string
generateHash()

Generate a unique hash for each version of the plugin.

boolean
isRequest()

Return true if the object is a request plugin. Always return false here.

from Plugin
boolean
isResponse()

Return true if the object is a response plugin. Always return true here.

from Response
string
getName()

Return the name of the plugin.

void
setResponse(Response $xResponse)

Set the <Jaxon\Response\Response> object

from Response
response()

Get the <Jaxon\Response\Response> object

from Response
void
addCommand(array $aAttributes, string $sData)

Add a client side plugin command to the response object

from Response
string
getJs()

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

from Response
string
getCss()

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

from Response
__construct()

The plugin constructor.

Element
element(string $sSelector = '', string $sContext = '')

Create a JQuery Element with a given selector, and link it to the current response.

Details

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

at line line 42
string getScript()

Return init script for the Jaxon JQuery plugin.

The init code registers the "jquery" handler with the Jaxon javascript library, together with a function wich runs the javascript code generated by the plugin.

Return Value

string

at line line 28
string generateHash()

Generate a unique hash for each version of the plugin.

Return Value

string

in Plugin at line line 50
boolean isRequest()

Return true if the object is a request plugin. Always return false here.

Return Value

boolean

in Response at line line 81
boolean isResponse()

Return true if the object is a response plugin. Always return true here.

Return Value

boolean

at line line 18
string getName()

Return the name of the plugin.

Return Value

string

in Response at line line 44
void setResponse(Response $xResponse)

Set the <Jaxon\Response\Response> object

Parameters

Response $xResponse The response

Return Value

void

in Response at line line 54
Response response()

Get the <Jaxon\Response\Response> object

Return Value

Response

in Response at line line 71
void addCommand(array $aAttributes, string $sData)

Add a client side plugin command to the response object

Used internally to add a command to the response command list. This will call <Jaxon\Response\Response->addPluginCommand> using the reference provided in <Jaxon\Response\Response->setResponse>.

Parameters

array $aAttributes The attributes of the command
string $sData The data to be added to the command

Return Value

void

in Response at line line 93
string getJs()

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

The code must be enclosed in the appropriate HTML tags.

Return Value

string

in Response at line line 105
string getCss()

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

The code must be enclosed in the appropriate HTML tags.

Return Value

string

at line line 10
__construct()

The plugin constructor.

at line line 62
Element element(string $sSelector = '', string $sContext = '')

Create a JQuery Element with a given selector, and link it to the current response.

Since this element is linked to a response, its code will be automatically sent to the client. The returned object can be used to call jQuery functions on the selected elements.

Parameters

string $sSelector The jQuery selector
string $sContext A context associated to the selector

Return Value

Element