Download the PHP package fr3nch13/cakephp-stats without Composer
On this page you can find all versions of the php package fr3nch13/cakephp-stats. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download fr3nch13/cakephp-stats
More information about fr3nch13/cakephp-stats
Files in fr3nch13/cakephp-stats
Package cakephp-stats
Short Description Statistics plugin for CakePHP Projects
License MIT
Homepage https://github.com/fr3nch13/cakephp-stats
Informations about the package cakephp-stats
CakePHP Stats Plugin
Used to track and display statistics, and Trends.
Installation
You can install this plugin into your CakePHP application using composer.
The recommended way to install composer packages is:
Usage
This all revolves around the event listener StatsListener
.
To use this plugin, you need to extend the StatsListener
, and define your StatsObject
keys
in it.
As an example of how to extend the StatsListener
and define your objects
.
src/Event/TestListener.php:
Once you've created your Listener that has been extended from the StatsListener
, you need to register it. In either your Application.php
(if you're directly using it within an app), or your Plugin.php
(if your using this within another plugin), you need to Use the EventManager to register your Listener in the bootstrap()
method. For an example, See: StatsPlugin.php
's bootstrap()
.
src/BlogPlugin.php
src/Controller/ArticlesController.php
To use the controller trait, you can do so like:
See: TestsController
.
src/Controller/Admin/ArticlesController.php
All versions of cakephp-stats with dependencies
cakephp/migrations Version ~4.1
cakephp/plugin-installer Version ~2.0