Exemplo n.º 1
0
	public static function create(){
		if (!isset(self::$instance)) {
			$c = __CLASS__;
			self::$instance = new $c;
		}
		return self::$instance;
	}
Exemplo n.º 2
0
 public function __construct()
 {
     if (!$this->db) {
         $this->db = YYKPDO::create();
     }
 }