我正在尝试从自定义身份验证处理程序在数据库中写入一些登录失败信息。我的问题是访问数据库,因为我不知道Doctrine对象可能存储在哪里namespace MyApp\FrontBundle\Controller;
use Symfony\Component\HttpFoundation\Request as Requ
在/src/AppBundle/Controller/CustomExceptionController.php中,我有:use Symfony\Component\HttpKernel\Log\DebugLoggerInterface;
use Symfony\Component\HttpFoundati
我有一个为页面查找数据的服务,但如果找不到数据,应该重定向到主页。在我的生命中,我不知道如何在Sf2中做到这一点。有这么多不同的方式来使用服务和路由器,但似乎都不起作用。namespace Acme\SomeBundle\Services;
use \Doctrine\ORM\EntityManager;
use \Symfony\Component\HttpKernel\Event\GetRespon