/Users/mgirouard/Sites/panda-php/trunk/Panda/Loader/Singleton.php

Go to the documentation of this file.
00001 <?php
00002 
00003 require 'Panda/Loader/Abstract.php';
00004 
00012 class Panda_Loader_Singleton
00013 extends Panda_Loader_Abstract
00014 {
00020         public static function singleton()
00021         {
00022                 static $Instance;
00023                 
00024                 if ($Instance === null) {
00025                         $Instance = new self;
00026                 }
00027                 
00028                 return $Instance;
00029         }
00030         
00037         public static function autoload($className)
00038         {
00039             return self::singleton()->load($className);
00040         }
00041 
00045         private function __clone() 
00046         {}
00047 }

Generated on Thu Sep 4 01:56:50 2008 for Panda PHP Components by  doxygen 1.5.4