I'm just started learning Symfony2. I have problem with using interface in controller. I've created very simple interface, then implemented it in controller and now Symfony debugger shout that my method is incompatible with interface. Below is my code.
Webrama\UserBundle\Controller:
namespace Webrama\UserBundle\Controller;
use Webrama\UserBundle\Model\InitializableControllerInterface;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
class DefaultController extends Controller implements InitializableControllerInterface
{
public function initialize(Request $request,
SecurityContextInterface $security_context,
FilterControllerEvent $event)
{
}
}
And the interface:
namespace Webrama\UserBundle\Model {
interface InitializableControllerInterface
{
public function initialize(Request $request,
SecurityContextInterface $security_context,
FilterControllerEvent $event);
}
}
I've simply copied method from interface, added a body to it and I can't see any problem here. Of course there is at least one. Any ideas?