PHP code example of mnhcc / ml-core
1. Go to this page and download the library: Download mnhcc/ml-core 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/ */
mnhcc / ml-core example snippets
namespace mnhcc\ml { const INDEX = true; }
(__DIR__);
use mnhcc\ml\classes\EventManager;
use mnhcc\ml\classes\Event;
use mnhcc\ml\classes\EventParms;
EventManager::register(new Event(function (EventParms $p) {
// do something with $p->getParms() / $p->get('key')
}, 'myEvent'));
EventManager::raise('myEvent', new EventParms(['key' => 'value']));