You are here: Re: how to clone a class? « PHP Language « IT news, forums, messages
Re: how to clone a class?

Posted by ZeldorBlat on 04/22/07 20:13

On Apr 21, 5:16 pm, "_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

Look at this:

<http://www.php.net/manual/en/language.oop5.cloning.php>

In particular, you need to define a __clone() method in your Garden
class. This method should, in turn, use the clone operator on all of
the Flowers in the Garden.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация