Add more subscribers
This commit is contained in:
22
app/Subscriber/BootstrapSubscriber.php
Normal file
22
app/Subscriber/BootstrapSubscriber.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace Subscriber;
|
||||
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
|
||||
class BootstrapSubscriber extends Base implements EventSubscriberInterface
|
||||
{
|
||||
public static function getSubscribedEvents()
|
||||
{
|
||||
return array(
|
||||
'session.bootstrap' => array('setup', 0),
|
||||
'api.bootstrap' => array('setup', 0),
|
||||
);
|
||||
}
|
||||
|
||||
public function setup()
|
||||
{
|
||||
$this->container['config']->setupTranslations();
|
||||
$this->container['config']->setupTimezone();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user