PHP code example of provm / events
1. Go to this page and download the library: Download provm/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/ */
provm / events example snippets
class Handler {
public function __invoke($request, $response) {
// do something else
return $response;
}
public function other($request, $response) {
// other action
return $response;
}
}
$app->add('event2', new Handler());
$app->add('other', [new Handler(), 'other']);