-1
我创建登录的事件利斯特但我在配置services.yml已经probleme没有扩展能够加载配置service.yml
代码LoginListener:
<?php
namespace Enso\UserBundle\EventListener;
use Symfony\Component\Security\Http\Event\InteractiveLoginEvent;
use Symfony\Bundle\DoctrineBundle\Registry as Doctrine;
class LoginListener
{
protected $doctrine;
public function __construct(Doctrine $doctrine)
{
$this->doctrine = $doctrine;
}
public function onLogin(InteractiveLoginEvent $event)
{
$user = $event->getAuthenticationToken()->getUser();
if($user)
{
setNbrelog() = getNbrelog()+1;
}
}
}
代码services.yml:
dbla_user.login_listener:
class: Enso\UserBundle\EventListener\LoginListener
arguments: [@doctrine]
tags:
- { name: kernel.event_listener, event: security.interactive_login, method: onLogin }
这probleme:
请帮助我,谢谢
的可能的复制[Symfony2的:没有扩展能够加载用于配置](http://stackoverflow.com/questions/16122641/symfony2-有此结果没有延伸-能够对负载的配置换) – DonCallisto