mvlabs/mvlabs-eventlogger

MvlabsEventLogger is a ZF2 module that allow to log user events in easy way based on event listener.

0.1.1 2016-06-29 14:28 UTC

This package is not auto-updated.

Last update: 2024-11-09 20:44:57 UTC


README

MvlabsEventLogger is a ZF2 module that allow to log user events in easy way based on event listener.

Requirements PHPExcel library

  • PHP version 5.5.0 or higher

Installation

With composer

  1. Add to your composer.json :

    $ php composer.phar require mvlabs/mvlabs-eventlogger
  2. Now tell composer to download MvlabsEventLogger by running the command:

    $ php composer.phar update mvlabs/mvlabs-eventlogger

Post installation

  1. Enabling it in your application.config.phpfile.

    <?php
    return [
        'modules' => [
            // ...
            'MvlabsEventLogger',            
        ],
        // ...
    ];

Usage

The module registers an EventManager:

$eventManager = $serviceLocator->get('MvlabsEventLogger\EventManager\EventManager');
//register event
$this->eventManager->trigger('user.logging', $this, [
   'platform' => 'mvlabs',
   'area' => 'users',
   'action' => 'user loggin',
]);