Download the PHP package travy/cake-tracking without Composer
On this page you can find all versions of the php package travy/cake-tracking. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download travy/cake-tracking
More information about travy/cake-tracking
Files in travy/cake-tracking
Package cake-tracking
Short Description Request tracking middleware used for CakePHP 3 applications
License MIT
Informations about the package cake-tracking
Cake Tracking Plugin
Description
The Cake Tracking Plugin provides Middleware which will record all Request made to a web application. All logging can be customized per application but there is also a default logger which will write to the file system.
In addition, external IP addresses can be blacklisted from the site by adding the address to a blacklist file.
Installation
Add the package to your CakePHP projects composer.json
Next, be sure to add the plugin to the config/bootstrap.php
file by executing the following command in the command prompt
Now the Middleware can be loaded into the application pipeline by appending it to the MiddlewareQueue found in `src/Application.php'
Finally, you should be able to add any custom configuration necessary to complete the environment.
If you want to use a custom Logger or blacklisting solution (perhaps to store data in a database)
then you just need to create a class which implements either TrackingLoggerInterface
or BlacklistRepositoryInterface
.
Then before adding the Middleware to the MiddlewareQueue, you can specify your custom classes
using the built in setter calls.
Configurations
The following configurations are optional but will be useful for system setup.
In config/app.php
add the following:
The LogFile configuration will specify where all Requests should be logged.
Blacklist specifies the location of the blacklist on the system.