1. Go to this page and download the library: Download ltsc/simple-event library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
$events = LTSC\Event\Events::getInstance();
$events->add('click', 99, function($msg) {
echo "My order is 99, argument is $msg";
});
$event->emit('click', 'Hello');
$events = LTSC\Event\CustomEvents::getInstance(
new \LTSC\Event\Helper\CEConfigure(
Parent_Class::class,
'call_method',
['arguments_for_construct']
)
);
$list = $events->getEventList(); //all event names which allowed is add here
$list->add('click', 0); //max events for click, 0 is no limit
$events->addEvents('click', MyEvents::class);
$events->call('click', 'Hello');
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.