\DevOwl\RealCookieBanner\liteMaxMindDatabase

A common service to download the MaxMind database to the WordPress `uploads` directory.

Summary

Methods
Properties
Constants
getPluginConstantPrefix()
lookupCountryCode()
getPath()
clear()
exists()
download()
http_request_args()
getInstance()
No public properties found
DATABASE_NAME
DATABASE_EXTENSION
No protected methods found
No protected properties found
N/A
__construct()
$me
N/A

Constants

DATABASE_NAME

DATABASE_NAME ='GeoLite2-Country'

DATABASE_EXTENSION

DATABASE_EXTENSION ='.mmdb'

Properties

Methods

getPluginConstantPrefix()

getPluginConstantPrefix(): string

Get the prefix of this plugin so composer packages can dynamically build other constant values on it.

Returns

string

lookupCountryCode()

lookupCountryCode(string  $ip)

Lookup country code by IP address. Can return `null` if not found.

Parameters

string $ip

getPath()

getPath()

Get the absolute path where the database is located.

clear()

clear()

Delete the database.

exists()

exists()

Check if the database exists.

download()

download(array  $args = array()): \WP_Error|true

Download the database `gzip`ped and extract it.

Parameters

array $args

Additional query arguments

Returns

\WP_Error|true

http_request_args()

http_request_args(array  $args)

Disable `reject_unsafe_urls` for our download URL to make it work with Docker environments.

Parameters

array $args

getInstance()

getInstance()

Get singleton instance.

__construct()

__construct()

C'tor.