Is there a better way? If not, is this a reasonable feature request, that
is, to _really_ clear all messages so the object can be reused for batch
ops.

What exactly is the feature request?

If you check out Zend_Form, it has been designed such that when its cloned, it will actually enforce cloning throughout all of its consumed objects (elements, sub-forms, and display groups). So it is already capable of being "safely" cloned.

http://framework.zend.com/svn/framework/standard/trunk/library/Zend/Form.php

In general, cloning is a great object-oriented technique for doing exactly what you want. Also, generally speaking, cloning is typically (depending on the implementation of __clone in the target class), much faster than building an object graph from scratch.

Cheers!
-ralph

Reply via email to