/** * Get the instance, or set up a new one. * @return MongoSession */ public static function instance() { if (self::$instance) { return self::$instance; } //set up a proper instance self::$instance = new self(); return self::$instance; }