\CJAX\CoreDOMEvents

The DOMEvents class that implements methods to handle specific AJAX events.

Summary

Methods
Properties
Constants
__construct()
call()
callc()
dataTransfer()
form()
keypress()
overLay()
overlayContent()
post()
postVars()
template()
text()
$loading
$post
$text
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$coreEvents
N/A

Properties

$loading

$loading : boolean

The loading property, defines whether to force system to adapt to a loading or not loading state.

Type

boolean

$post

$post : array

The post property, stores an array of post data used for PHP.

Type

array

$text

$text : string

The text property, specifies the text to show when the page is loading By default the text is "loading.

.", but it can be replaced.

Type

string

$coreEvents

$coreEvents : \CJAX\Core\CoreEvents

The coreEvents property, stores an instance of injected CoreEvents object.

Type

\CJAX\Core\CoreEvents

Methods

__construct()

__construct(\CJAX\Core\CoreEvents  $coreEvents) : \CJAX\Core\DOMEvents

The constructor for DOMEvents class, creates an instance of DOMEvents object.

Parameters

\CJAX\Core\CoreEvents $coreEvents

Returns

\CJAX\Core\DOMEvents

call()

call(string  $url, string  $containerId = null, string  $confirm = null) : string

The call method, creates Ajax calls.

Parameters

string $url
string $containerId
string $confirm

Returns

string

callc()

callc(string  $url, string  $containerId = null, string  $confirm = null) : \CJAX\Core\XmlItem

The callc method, makes several requests without exec event.

This method is an alternative to call() when the requests go so fast and need just a little timeout to work properly.

Parameters

string $url
string $containerId
string $confirm

Returns

\CJAX\Core\XmlItem

dataTransfer()

dataTransfer(string  $actions, array  $dataTransfer = null) : \CJAX\Core\XmlItem

The dataTransfer method, handles data transfer for drag and drop event.

Parameters

string $actions
array $dataTransfer

Returns

\CJAX\Core\XmlItem

form()

form(string  $url, string  $formId = null, string  $containerId = null, string  $confirm = null) : \CJAX\Core\XmlItem

The form method, converts a form into AJAX form and submits this form.

Parameters

string $url
string $formId
string $containerId
string $confirm

Returns

\CJAX\Core\XmlItem

keypress()

keypress(string  $elementId, mixed  $actions, string|array  $key = null) : \CJAX\Core\XmlItem

The keypress method, converts a form into AJAX form and submits this form.

Parameters

string $elementId
mixed $actions
string|array $key

Returns

\CJAX\Core\XmlItem

overLay()

overLay(string  $url = null, array  $options = array(), boolean  $useCache = false) : \CJAX\Core\XmlItem

The overLay method, shows an overlay of resources from a given url.

If useCache parameter is true, the overlayed content will be cached until page refreshes.

Parameters

string $url
array $options
boolean $useCache

Returns

\CJAX\Core\XmlItem

overlayContent()

overlayContent(string  $content = null, array  $options = null) : \CJAX\Core\XmlItem

The overLay method, shows an overlay with supplied html content.

Parameters

string $content
array $options

Returns

\CJAX\Core\XmlItem

post()

post(string  $url, array  $vars = array()) : void

The post method, makes a post request with data assigned to $_POST array.

Parameters

string $url
array $vars

postVars()

postVars(array  $vars = array()) : void

The post method, it passes data to PHP $_POST array.

Parameters

array $vars

template()

template(string  $templateName) : string

The template method, loads a template file for CJAX.

Parameters

string $templateName

Returns

string

text()

text(string  $ms = '') : void

The text method, optionally replaces the "loading.

." text when an ajax call is placed.

Parameters

string $ms