Re: Static utility class?

From: Date: Thu, 05 Sep 2013 00:16:24 +0000
Subject: Re: Static utility class?
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-322039@lists.php.net to get a copy of this message
On 13-09-04 05:09 PM, Micky Hulse wrote:
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 <stephen-d@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 Well, your code does not take advantage of the features of classes, but the syntax is correct.
Global, static variables are not consistent with the design concepts of OOP. But as a first step in moving from procedural code to OOP, which is learning the syntax, go for it. -- Stephen

« previous php.general (#322039) next »