0
In my entity I have the following magic method:
public function __get($key)
{
return null;
}
On my controller I have the following code:
$clients = $this
->getDoctrine()
->getRepository("AppBundle:Clients")
->findAll()
;
//...
$naoExiste = $app->getNaoexiste(),
Despite the method __get
exist within the entity, the following error occurs:
Attempted to call an Undefined method named "getNaoexiste" of class "Appbundle Entity Clients".
The method __get
does not work in the entities?
Thank you Wallace, I really changed the methods. Regarding the Doctrine, in what situation the verification of the method with
method_exists
occurs? I currently have no property with true/false values, but if there could be assigned the valuefalse
erroneously, that’s what you mean?– Filipe Moraes