PHP code example of toandp / events
1. Go to this page and download the library: Download toandp/events 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/ */
toandp / events example snippets
// Get needed classes
use tdp\events\EventManager;
$eManager = new EventManager();
// Simple
$eManager->on('create', function () {
echo "Something action";
});
// Just do it!
$eManager->trigger('create');