\CJAX\EventFocusEvent

The FocusEvent class, representing focus-related events like focus, blur, focusin, or focusout.

The event class provides properties from javascript event object, which PHP can use in AJAX request. To use event classes, pass it as first argument to controller classes. CJAX is smart enough to create event object automatically.

Summary

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

$component

$component : string

The component property, stores the primary component id involved in focus change.

Type

string

$oppositeComponent

$oppositeComponent : string

The oppositeComponent property, specifies the other Component involved in this focus change.

Type

string

Methods

__construct()

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

The constructor for FocusEvent class, it initializes basic focus event properties.

Parameters

\StdClass $event

Returns

\CJAX\Event\FocusEvent

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

getComponent()

getComponent() : string

The getComponent method, returns the primary component in this focus change.

Returns

string

getOppositeComponent()

getOppositeComponent() : string

The getOppositeComponent method, returns the other component in this focus change.

Returns

string