/** * Resets all references to other model objects or collections of model objects. * * This method is a user-space workaround for PHP's inability to garbage collect * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { if ($deep && !$this->alreadyInClearAllReferencesDeep) { $this->alreadyInClearAllReferencesDeep = true; if ($this->collSearchIndexWords) { foreach ($this->collSearchIndexWords as $o) { $o->clearAllReferences($deep); } } if ($this->aPage instanceof Persistent) { $this->aPage->clearAllReferences($deep); } if ($this->aLanguage instanceof Persistent) { $this->aLanguage->clearAllReferences($deep); } if ($this->aUserRelatedByCreatedBy instanceof Persistent) { $this->aUserRelatedByCreatedBy->clearAllReferences($deep); } if ($this->aUserRelatedByUpdatedBy instanceof Persistent) { $this->aUserRelatedByUpdatedBy->clearAllReferences($deep); } $this->alreadyInClearAllReferencesDeep = false; } // if ($deep) if ($this->collSearchIndexWords instanceof PropelCollection) { $this->collSearchIndexWords->clearIterator(); } $this->collSearchIndexWords = null; $this->aPage = null; $this->aLanguage = null; $this->aUserRelatedByCreatedBy = null; $this->aUserRelatedByUpdatedBy = null; }
/** * Resets all references to other model objects or collections of model objects. * * This method is a user-space workaround for PHP's inability to garbage collect * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { if ($deep && !$this->alreadyInClearAllReferencesDeep) { $this->alreadyInClearAllReferencesDeep = true; if ($this->aPage instanceof Persistent) { $this->aPage->clearAllReferences($deep); } if ($this->aUserRelatedByCreatedBy instanceof Persistent) { $this->aUserRelatedByCreatedBy->clearAllReferences($deep); } if ($this->aUserRelatedByUpdatedBy instanceof Persistent) { $this->aUserRelatedByUpdatedBy->clearAllReferences($deep); } $this->alreadyInClearAllReferencesDeep = false; } // if ($deep) $this->aPage = null; $this->aUserRelatedByCreatedBy = null; $this->aUserRelatedByUpdatedBy = null; }
/** * Resets all references to other model objects or collections of model objects. * * This method is a user-space workaround for PHP's inability to garbage collect * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { if ($deep && !$this->alreadyInClearAllReferencesDeep) { $this->alreadyInClearAllReferencesDeep = true; if ($this->collPagesRelatedById) { foreach ($this->collPagesRelatedById as $o) { $o->clearAllReferences($deep); } } if ($this->collPagePropertys) { foreach ($this->collPagePropertys as $o) { $o->clearAllReferences($deep); } } if ($this->collPageStrings) { foreach ($this->collPageStrings as $o) { $o->clearAllReferences($deep); } } if ($this->collContentObjects) { foreach ($this->collContentObjects as $o) { $o->clearAllReferences($deep); } } if ($this->collRights) { foreach ($this->collRights as $o) { $o->clearAllReferences($deep); } } if ($this->aPageRelatedByCanonicalId instanceof Persistent) { $this->aPageRelatedByCanonicalId->clearAllReferences($deep); } if ($this->aUserRelatedByCreatedBy instanceof Persistent) { $this->aUserRelatedByCreatedBy->clearAllReferences($deep); } if ($this->aUserRelatedByUpdatedBy instanceof Persistent) { $this->aUserRelatedByUpdatedBy->clearAllReferences($deep); } $this->alreadyInClearAllReferencesDeep = false; } // if ($deep) // nested_set behavior $this->collNestedSetChildren = null; $this->aNestedSetParent = null; if ($this->collPagesRelatedById instanceof PropelCollection) { $this->collPagesRelatedById->clearIterator(); } $this->collPagesRelatedById = null; if ($this->collPagePropertys instanceof PropelCollection) { $this->collPagePropertys->clearIterator(); } $this->collPagePropertys = null; if ($this->collPageStrings instanceof PropelCollection) { $this->collPageStrings->clearIterator(); } $this->collPageStrings = null; if ($this->collContentObjects instanceof PropelCollection) { $this->collContentObjects->clearIterator(); } $this->collContentObjects = null; if ($this->collRights instanceof PropelCollection) { $this->collRights->clearIterator(); } $this->collRights = null; $this->aPageRelatedByCanonicalId = null; $this->aUserRelatedByCreatedBy = null; $this->aUserRelatedByUpdatedBy = null; }