Thank you so much for the quick and very informative/educational
replies Stephen and David, I really appreciate it! :)

On Wed, Sep 4, 2013 at 12:36 PM, Stephen <stephe...@rogers.com> wrote:
> This sounds simply like a library of functions that are implemented using
> objects.
> Instantiate your static variables in the library file. Again, so that only
> happens once.

"functions implemented using objects" sounds like exactly what I want.
Just out of curiosity, and sorry in advance for my ignorance, but does
the code I posted fit that type of pattern? If not, what would I need
to modify and how would I call it?

Actually, I should probably spend some time Googling before I ask you
for more details. :D

On Wed, Sep 4, 2013 at 1:15 PM, David Harkness
<davi...@highgearmedia.com> wrote:
> I can't say if what you're thinking of will make a good utility class since 
> the code you posted is fake. If you post some examples of methods you want to 
> make static, we can give you pointers on which are good candidates and which 
> are best left to instance methods.

Sorry about the fake code. To be honest, I have not written the code
just yet ... I'm kinda wanting to find the perfect pattern before I
get too far down the rabbit hole (though, this is for some simple
utility functions, so refactoring things should be easy later on).

I'll be sure to post real code for any follow up questions.

For now, thanks to you guys, I have a ton to work with. Thanks again
for the pro advice!

Cheers,
M

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to