0
我在Symfony2中的自定義用戶實體提供程序中遇到了一些問題。Symfony2自定義用戶提供程序問題
我得到這個錯誤:
FatalErrorException: Error: Class Cms\ControlPanel\UserBundle\Entity\User contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Symfony\Component\Security\Core\User\UserInterface::getUsername) in /Users/mathijs/workspaces/cms/src/Cms/ControlPanel/UserBundle/Entity/User.php line 144
user.php的:144:
public function equals(UserInterface $user)
{
return $user->getEmail() == $this->getEmail();
}
它說一些關於getUsername,但在我的文件留下:getEmail。
我做錯了什麼?