PHP code example of totten / lurkerlite
1. Go to this page and download the library: Download totten/lurkerlite 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/ */
totten / lurkerlite example snippets
php
use Lurker\Event\FilesystemEvent;
use Lurker\ResourceWatcher;
$watcher = new ResourceWatcher;
$watcher->track('twig.templates', '/path/to/views');
$watcher->addListener('twig.templates', function (FilesystemEvent $event) {
echo $event->getResource() . 'was' . $event->getTypeString();
});
$watcher->start();