<?php
namespace App\Subscriber\Content;
use App\Event\Content\ContentWatchedEvent;
use App\Service\Content\MemberContentService;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class MediacenterSubscriber implements EventSubscriberInterface
{
protected MemberContentService $service;
/**
* MediacenterSubscriber constructor.
*/
public function __construct(MemberContentService $service)
{
$this->setService($service);
}
public function setService(MemberContentService $service): self
{
$this->service = $service;
return $this;
}
public function getService(): MemberContentService
{
return $this->service;
}
public static function getSubscribedEvents(): array
{
return [
ContentWatchedEvent::class => [
['onContentWatched', 0],
],
];
}
public function onContentWatched(ContentWatchedEvent $event)
{
}
}