\CJAX\EventActionEvent

The ActionEvent class, representing a basic mouse single click event.

The action event is a lite-version of MouseEvent, which does not store any mouse related properties.

Summary

Methods
Properties
Constants
__construct()
canBubble()
isCancelable()
hasDefaultPrevented()
getPhase()
getSource()
getTarget()
getTimeStamp()
isTrusted()
getType()
__toString()
getActionCommand()
getWhen()
No public properties found
CAPTURING_PHASE
AT_TARGET
BUBBLING_PHASE
No protected methods found
$bubbles
$cancelable
$defaultPrevented
$phase
$source
$target
$timeStamp
$trusted
$type
N/A
No private methods found
No private properties found
N/A

Constants

CAPTURING_PHASE

CAPTURING_PHASE

The CAPTURING_PHASE constant, defines the integer value for capturing phase event status.

AT_TARGET

AT_TARGET

The AT_TARGET constant, defines the integer value for at-target phase event status.

BUBBLING_PHASE

BUBBLING_PHASE

The BUBBLING_PHASE constant, defines the integer value for bubbling phase event status.

Properties

$bubbles

$bubbles : boolean

The bubbles property, specifies if a specific event can bubble or not.

Type

boolean

$cancelable

$cancelable : boolean

The cancelable property, specifies if a if a specific event is cancelable.

Type

boolean

$defaultPrevented

$defaultPrevented : boolean

The defaultPrevented property, checks if default is prevented.

Type

boolean

$phase

$phase : integer

The phase property, defines the event phase.

Type

integer

$source

$source : string

The source property, stores the id of element that triggers the event.

Type

string

$target

$target : string

The target property, stores the id of element whose event listener triggers this event.

Type

string

$timeStamp

$timeStamp : integer

The timeStamp property, specifies the number of milliseconds since midnight of January 1, 1970.

Type

integer

$trusted

$trusted : boolean

The trusted property, checks if the event is trusted or not.

Type

boolean

$type

$type : string

The target property, defines the type of event that was triggered.

Type

string

Methods

__construct()

__construct(\StdClass  $event) : \CJAX\Event\Event

The constructor for Event class, it initializes basic event properties for every child event classes.

Parameters

\StdClass $event

Returns

\CJAX\Event\Event

canBubble()

canBubble() : boolean

The canBubble method, find out if a specific event can bubble or not.

Returns

boolean

isCancelable()

isCancelable() : boolean

The isCancelable method, find out if a specific event is cancelable.

Returns

boolean

hasDefaultPrevented()

hasDefaultPrevented() : boolean

The hasDefaultPrevented method, checks whether the preventDefault() method was called for the event.

Returns

boolean

getPhase()

getPhase() : integer

The getPhase method, returns a number that indicates which phase of the event flow is currently being evaluated.

Returns

integer

getSource()

getSource() : string

The getSource method, returns the element that triggered the event.

Returns

string

getTarget()

getTarget() : string

The getTarget method, returns the element whose event listeners triggered the event.

Returns

string

getTimeStamp()

getTimeStamp() : integer

The getTimeStamp method, gets the number of milliseconds since midnight of January 1, 1970.

Returns

integer

isTrusted()

isTrusted() : boolean

The isTrusted method, find out if a specific event is trusted.

Returns

boolean

getType()

getType() : string

The isTrusted method, return the type of event that was triggered.

Returns

string

__toString()

__toString() : string

Magic method __toString, acquires the event's information in string format.

Returns

string

getActionCommand()

getActionCommand() : string

The getActionCommand method, obtains the command string associate with this action.

Returns

string

getWhen()

getWhen() : \DateTime

The getWhen method, returns when the event occurs.

This method returns a DateTime object, as opposed to getTimeStamp method which returns timestamp.

Returns

\DateTime