\CJAX\EventInputEvent

The abstract InputEvent class, parent class of all CJAX input event type classes.

An InputEvent represents any events associated with user input, such as keyboard and mouse events.

Summary

Methods
Properties
Constants
__construct()
canBubble()
isCancelable()
hasDefaultPrevented()
getPhase()
getSource()
getTarget()
getTimeStamp()
isTrusted()
getType()
__toString()
isAltDown()
getComponent()
isControlDown()
isMetaDown()
isShiftDown()
getLocation()
No public properties found
CAPTURING_PHASE
AT_TARGET
BUBBLING_PHASE
No protected methods found
$bubbles
$cancelable
$defaultPrevented
$phase
$source
$target
$timeStamp
$trusted
$type
$altKey
$component
$ctrlKey
$metaKey
$shiftKey
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

$altKey

$altKey : boolean

The altKey property, checks if the "ALT" key was pressed when input event is was triggered.

Type

boolean

$component

$component : string

The component property, stores the component id involved in this input event.

Type

string

$ctrlKey

$ctrlKey : boolean

The ctrlKey property, checks if the "CTRL" key was pressed when input event is was triggered.

Type

boolean

$metaKey

$metaKey : boolean

The metaKey property, checks if the "META" key was pressed when input event is was triggered.

Type

boolean

$shiftKey

$shiftKey : boolean

The shiftKey property, checks if the "SHIFT" key was pressed when input event is was triggered.

Type

boolean

Methods

__construct()

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

The constructor for InputEvent class, it initializes basic input event properties.

Child classes of InputEvent need to call this parent constructor to ensure complete initialization of event object.

Parameters

\StdClass $event

Returns

\CJAX\Event\InputEvent

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

isAltDown()

isAltDown() : boolean

The isAltDown method, returns whether or not the Alt modifier is down on this event.

Returns

boolean

getComponent()

getComponent() 

The getComponent method, obtains the component id associated with this input event.

isControlDown()

isControlDown() : boolean

The isControlDown method, returns whether or not the Control modifier is down on this event.

Returns

boolean

isMetaDown()

isMetaDown() : boolean

The isMetaDown method, returns whether or not the Meta modifier is down on this event.

Returns

boolean

isShiftDown()

isShiftDown() : boolean

The isShiftDown method, returns whether or not the Shift modifier is down on this event.

Returns

boolean

getLocation()

getLocation() : mixed

The abstract method getLocation, finds the location of the input device associated with this event.

This method will need to be overriden by child classes to provide different implementations.

Returns

mixed