예제 #1
0
 /**
  * return a singleton instance of Container class
  *
  * @return object
  * @author Andy Bennett
  */
 public function instance($container = null)
 {
     if (self::$instance == NULL) {
         // Create a new instance
         self::$instance = ContainersLib::factory($container);
     }
     return self::$instance;
 }
예제 #2
0
 /**
  * constructor
  *
  * @author Andy Bennett
  */
 function __construct()
 {
     $this->model = new Containers_Model();
     // Singleton instance
     self::$instance = $this;
 }