public function singleton() { if (empty(self::$_singleton)) { $obj = __CLASS__; self::$_singleton = new $obj(); return self::$_singleton; } }