/** * The singleton method * * @return object Instance of this class * * @author Khaled Al-Sham'aa <*****@*****.**> */ public static function singleton() { if (!isset(self::$instance)) { $c = __CLASS__; self::$instance = new $c; } return self::$instance; }