class Daz_Config {
private static $instance;
private function __construct(){
$this-load();
}
private function load() {
...
}
public function get($key) {
...
}
public static getInstance(){
if (!self::$instance) self::$instance = new Daz_Config();
Why not just create a no named function in the top of the class. This this way
it loads on include.
Richard Buskirk
Sent from my iPhone
On Mar 31, 2011, at 12:56 AM, D. Dante Lorenso da...@lorenso.com wrote:
All,
I want to build a config file class that gets called statically. Is there
There is such thing, but its not called static constructor, its called
singleton pattern
class SingletonA
{
public static instance;
public SingletonA(){}
public static function getInstancce()
{
if(self::instance != null)
{
return self::instanc;
}
return new
On 31 March 2011 06:56, D. Dante Lorenso da...@lorenso.com wrote:
All,
I want to build a config file class that gets called statically. Is there
such a thing as a static constructor? Example:
class Daz_Config {
public static function load() {
...
}
public static function
4 matches
Mail list logo