From b3286eb015079950554508e0724fd5f12c71833f Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Wed, 24 May 2023 21:18:39 -0500 Subject: add geolocation functionality --- .../reader/src/MaxMind/Db/Reader/Metadata.php | 112 +++++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 vendor/maxmind-db/reader/src/MaxMind/Db/Reader/Metadata.php (limited to 'vendor/maxmind-db/reader/src/MaxMind/Db/Reader/Metadata.php') diff --git a/vendor/maxmind-db/reader/src/MaxMind/Db/Reader/Metadata.php b/vendor/maxmind-db/reader/src/MaxMind/Db/Reader/Metadata.php new file mode 100644 index 0000000..873064b --- /dev/null +++ b/vendor/maxmind-db/reader/src/MaxMind/Db/Reader/Metadata.php @@ -0,0 +1,112 @@ +binaryFormatMajorVersion = + $metadata['binary_format_major_version']; + $this->binaryFormatMinorVersion = + $metadata['binary_format_minor_version']; + $this->buildEpoch = $metadata['build_epoch']; + $this->databaseType = $metadata['database_type']; + $this->languages = $metadata['languages']; + $this->description = $metadata['description']; + $this->ipVersion = $metadata['ip_version']; + $this->nodeCount = $metadata['node_count']; + $this->recordSize = $metadata['record_size']; + $this->nodeByteSize = $this->recordSize / 4; + $this->searchTreeSize = $this->nodeCount * $this->nodeByteSize; + } +} -- cgit v1.2.3-70-g09d2