Re: [PHP] Static utility class?

[email protected] (Stephen)
Newsgroups php.general
Message-ID <[email protected]>
On 13-09-04 03:25 PM, Micky Hulse wrote:
> I want to have a "utility" class that contain utility methods which should
> have the option of being called multiple times on a page.
This sounds simply like a library of functions that are implemented 
using objects.

You can use the standard "require_once" in your various PHP source files 
so you only deal with loading the library file in the first file in 
which it is needed. It would not be loaded from other files.

Instantiate your static variables in the library file. Again, so that 
only happens once.

-- 
Stephen
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.