Skip to content

Latest commit

 

History

History
59 lines (41 loc) · 1.08 KB

README.md

File metadata and controls

59 lines (41 loc) · 1.08 KB

MvlabsEventLogger

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',
]);