Download the PHP package totten/lurkerlite without Composer
On this page you can find all versions of the php package totten/lurkerlite. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download totten/lurkerlite
More information about totten/lurkerlite
Files in totten/lurkerlite
Package lurkerlite
Short Description Resource Watcher - Lightweight edition of henrikbjorn/lurker with no dependencies
License MIT
Informations about the package lurkerlite
Lurkerlite
Lurkerlite provides PHP utilities for monitoring files and directories for changes. It is a fork of henrikbjorn/lurker.
Usage
Use composer
to install the package:
Lurker works by giving the resource watcher a tracking id which is the name of the event and a path to the resource you want to track.
When all the resources have been added that should be track you would want to add event listeners for them so your can act when the resources are changed.
The above example would watch for all events create
, delete
and modify
. This can be controlled by passing a
third parameter to track()
.
Note that FilesystemEvent::ALL
is a special case and of course means it will watch for every type of event.
Comparison
totten/lurkerlite
v1.3 is a fork of henrikbjorn/lurker v1.2. The original
lurker
provides a portable ResourceWatcher
which monitors files and directories. Depending on operating-system and
runtime support, it chooses a different backend driver for tracking files. This is a great idea, and the
implementation has lots of tests.
The distinguishing characteristic of lurkerlite
is that it has no formal dependencies on other packages, which means it is:
- Less prone to version conflicts and stale dependencies
- Safer to embed in more contexts
lurkerlite
should be a drop-in replacement for lurker
unless you previously customized the event-dispatcher. If
you customized the event-dispatcher, see CHANGELOG.md.
Known Issues (Patch-welcome)
Lurker is designed to support multiple file-watching backends, most notably:
RecursiveIteratorTracker
: A portable (but less-efficient) backend based on filesystem polling.InotifyTracker
: A more efficient backend based on the Linuxinotify
API and PECL'sinotify
extension.
At time of writing, InotifyTracker
does not pass its tests, and the cause has not been determined. (Did it ever
work? Does it only work in certain environments?) Consequently, it is disabled by default in the stable release.
(To use the unstable implementation, call new ResourceWatcher(new InotifyTracker())
.
See also:
\Lurker\Tests\Tracker\TrackerTest::testMoveSubdirResource()
\Lurker\Tests\Tracker\InotifyTrackerTest::testMoveSubdirResource()
- https://github.com/flint/Lurker/issues/32