-1
設定service.ymlをロードすることができ拡張子はありませんが、私は、構成services.ymlにproblemeいるあり、私は、ログインのイベントリスタを作成
コード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