In my entity I have the following magic method :
public function __get($key)
{
return null;
}
In my controller I have the following code:
$clients = $this
->getDoctrine()
->getRepository("AppBundle:Clients")
->findAll()
;
//...
$naoExiste = $app->getNaoexiste(),
Although the __get
method exists within the entity, the following error occurs:
Attempted to call an undefined method named "getNoexist" of class "AppBundle \ Entity \ Clients".
Does not the __get
method work on entities?