You are here: Re: making a class object global « PHP Programming Language « IT news, forums, messages
Re: making a class object global

Posted by windandwaves on 11/17/06 02:15

Michael Fesser wrote:
> .oO(windandwaves)
>
> >I have a class from which I create an object. I want this object to be
> >available in all my functions for my application. Basically, I want to
> >make the object global. What is the best way to do this?
>
> You could search for "singleton".
>
> Micha

Thanks Micha

That is really cool. I was just reading about static and this is a
great way to use it. Thanks a million for the recommendation. Cool
stuff. What would actually be ideal is if there were a function like
global that you could use when creating an object, which would make the
object global without having to do this singleton stuff. It would
actually make sense if the global $myobj just did this if it were used
outside of a function.

Thanks

Nicolaas

 

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

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