|
Posted by C. on 04/22/07 14:24
On 21 Apr, 22:16, "_mario.lat" <n...@libero.it> wrote:
> Hallo,
> I have a class A to manage a grout of classes B.
> (for example "Class Garden" and "Class Flower" which are in garden)
> If i clone A (Garden) I'd like to clone also B (Folwers).
> How cn I do?
> thank you in advance,
> Mario
Presumably you've got references to flower objects in your garden
instance - the simplest way to get a deep clone is to serialize it:
$deep_clone=unserialize(serialize($garden));
There may be a smarter to do it - and of course the above may break if
you've got _sleep to lose the references.
C.
Navigation:
[Reply to this message]
|