/** * @return resource mysql connection */ public static function GetConnection() { if (!self::$conn) { self::$conn = new \PDO("mysql:host=" . self::DBHOST . ";dbname=" . self::DBNAME . ";", self::DBUSER, self::DBPASS); } return self::$conn; }