PHP code example of skopek / hooks
1. Go to this page and download the library: Download skopek/hooks 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/ */
skopek / hooks example snippets
$hooks = new Skopek\Hooks\Manager;
$hooks->action->add("header", function() {
echo "Hello!";
});
$hooks->action->run("header");
$hooks = new Skopek\Hooks\Manager;
$hooks->filter->add("header", function($value) {
return $value . " World!";
});
echo $hooks->filter->apply("header", "Hello");