Nice one!
Can't wait to roll that into some of my classes. Thanks, Piers On 03/07/2008, at 2:52 PM, James wrote: >>> abstract classYourBaseObject extends BaseObject >>> { >>> public function __destruct() >>> { >>> foreach ($this as $index => $value) >>> { >>> if (is_object($this->$index)) >>> { >>> if (method_exists($this->$index, "__destruct")) >>> { >>> $this->$index->__destruct(); >>> } >>> else if (get_class($this->$index) == "Criteria") >>> { >>> $this->$index->clear(); >>> } >>> } >>> unset($this->$index); >>> } >>> } >>> } --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---