/** * call the getters of each object field, in case some of the are lazy loading and we need the data to be loaded * * @static * @param Object_Concrete $object * @return void */ public static function loadAllObjectFields($object) { if ($object instanceof Object_Concrete) { //load all in case of lazy loading fields $fd = $object->getO_class()->getFieldDefinitions(); foreach ($fd as $def) { $getter = "get" . ucfirst($def->getName()); if (method_exists($object, $getter)) { $object->{$getter}(); } } } }