dev-master
9999999-devWatch changes
MIT
The Requires
- php ^7.2.0
- m4tthumphrey/php-gitlab-api ^9.10
- php-http/guzzle6-adapter ^1.1
- symfony/console ^4.1
- symfony/event-dispatcher ^4.1
- symfony/yaml ^4.1
- symfony/config ^4.1
Wallogit.com
2017 © Pedro Peláez
Watch changes
Please note that this project is currently under active development. We encourage everyone to try it and give feedback, but we don't recommend it for production use yet., (*2)
This tool watches a resource (filesystem, API resources, ...) and notify a listener of any changes., (*3)
You can install it by running Composer:, (*4)
$ composer require jdecool/watcher
First you need configure the tool by creating a watcher.yaml file:, (*5)
watcher: Vendor\Package\MyWatcher
storage: JDecool\Watcher\Storage\JsonStorage
listeners:
- Vendor\Package\Lister1
- Vendor\Package\Lister2
The watch class is an instance of JDecool\Watcher\Watcher and it is an implementation of a watcher. It will watch content to detect some change., (*6)
The class need to contain a method public function getObjects(): array to returns objects., (*7)
Information about data can be stored with different strategies and you need to define how you want to store those data with the storage key., (*8)
Finally, you need to register listeners that can be triggered. A listener class is an Symfony\Component\EventDispatcher\EventSubscriberInterface implementation., (*9)
Then you can run your watcher with vendor/bin/watcher., (*10)
Watch changes
MIT