php - How does Doctrine 2 retrieve entities without calling the entity's constructor? -


does know how works?

this works unserializing objects. unserializing in php prevent constructor called serialized object has been constructed.

create object without calling it's constructor in php:

$classname = 'stdclass'; # set classname here $serialized = sprintf('o:%d:"%s":0:{}', strlen($classname), $classname); $object = unserialize($serialized); 

for more details please see article: doctrine 2: give me constructor back


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -