/** * gets core instance * * @return BMObject * */ public static function singleton() { if (!isset(self::$instance)) { $obj = __CLASS__; self::$instance = new $obj; } return self::$instance; }