PHP Class Ojs\AnalyticsBundle\Listener\AnalyticsSubscriber

Inheritance: implements Symfony\Component\EventDispatcher\EventSubscriberInterface
Show file Open project: ojs/ojs

Public Methods

Method Description
__construct ( EntityManager $em, Symfony\Component\HttpFoundation\RequestStack $requestStack ) AnalyticsSubscriber constructor.
getSubscribedEvents ( ) : array Returns an array of event names this subscriber wants to listen to.
onArticleFileDownload ( Ojs\SiteBundle\Event\DownloadArticleFileEvent $event )
onArticleView ( Ojs\SiteBundle\Event\ViewArticleEvent $event )
onIssueFileDownload ( Ojs\SiteBundle\Event\DownloadIssueFileEvent $event )
onIssueView ( Ojs\SiteBundle\Event\ViewIssueEvent $event )
onJournalView ( Ojs\SiteBundle\Event\ViewJournalEvent $event )

Method Details

__construct() public method

AnalyticsSubscriber constructor.
public __construct ( EntityManager $em, Symfony\Component\HttpFoundation\RequestStack $requestStack )
$em Doctrine\ORM\EntityManager
$requestStack Symfony\Component\HttpFoundation\RequestStack

getSubscribedEvents() public static method

The array keys are event names and the value can be: * The method name to call (priority defaults to 0) * An array composed of the method name to call and the priority * An array of arrays composed of the method names to call and respective priorities, or 0 if unset For instance: * array('eventName' => 'methodName') * array('eventName' => array('methodName', $priority)) * array('eventName' => array(array('methodName1', $priority), array('methodName2'))
public static getSubscribedEvents ( ) : array
return array The event names to listen to

onArticleFileDownload() public method

public onArticleFileDownload ( Ojs\SiteBundle\Event\DownloadArticleFileEvent $event )
$event Ojs\SiteBundle\Event\DownloadArticleFileEvent

onArticleView() public method

public onArticleView ( Ojs\SiteBundle\Event\ViewArticleEvent $event )
$event Ojs\SiteBundle\Event\ViewArticleEvent

onIssueFileDownload() public method

public onIssueFileDownload ( Ojs\SiteBundle\Event\DownloadIssueFileEvent $event )
$event Ojs\SiteBundle\Event\DownloadIssueFileEvent

onIssueView() public method

public onIssueView ( Ojs\SiteBundle\Event\ViewIssueEvent $event )
$event Ojs\SiteBundle\Event\ViewIssueEvent

onJournalView() public method

public onJournalView ( Ojs\SiteBundle\Event\ViewJournalEvent $event )
$event Ojs\SiteBundle\Event\ViewJournalEvent