Skip to content
This repository was archived by the owner on Jan 23, 2020. It is now read-only.

Latest commit

 

History

History
28 lines (21 loc) · 1001 Bytes

File metadata and controls

28 lines (21 loc) · 1001 Bytes

$Event - is system object, that handles events subscribing and dispatching, instance can be obtained in such way:

<?php
$Event = \cs\Event::instance();
###[Up](#) Methods

$Event object has next public methods:

  • on()
  • off()
  • once()
  • fire()

Subscribing for event. More details, and example of use

off($event : string, $callback : callable) : bool

Unsubscribing from event. More details, and example of use

once($event : string, $callback : callable) : bool

Subscribing for event for single execution. More details, and example of use

fire($event : string, $param1 = null : mixed|null, $_ = null : mixed|null) : bool

Dispatching of event. More details, and example of use