private function getGeoIpInstance($key)
    {
        if (empty($this->readerCache[$key])) {
            $pathToDb = self::getPathToGeoIpDatabase($this->customDbNames[$key]);
            if ($pathToDb !== false) {
                try {
                    $this->readerCache[$key] = new Reader($pathToDb);
                } catch (InvalidDatabaseException $e) {
                    // ignore invalid database exception
                }
            }
        }

        return empty($this->readerCache[$key]) ? false : $this->readerCache[$key];
    }
private function getGeoIpInstance($key)
    {
        if (empty($this->readerCache[$key])) {
            $pathToDb = self::getPathToGeoIpDatabase($this->customDbNames[$key]);
            if ($pathToDb !== false) {
                try {
                    $this->readerCache[$key] = new Reader($pathToDb);
                } catch (InvalidDatabaseException $e) {
                    // ignore invalid database exception
                }
            }
        }

        return empty($this->readerCache[$key]) ? false : $this->readerCache[$key];
    }
private function getGeoIpInstance ( $ key ) { if ( empty ( $ this -> readerCache [ $ key ] ) ) { $ pathToDb = self :: getPathToGeoIpDatabase ( $ this -> customDbNames [ $ key ] ) ; if ( $ pathToDb !== false ) { try { $ this -> readerCache [ $ key ] = new Reader ( $ pathToDb ) ; } catch ( InvalidDatabaseException $ e ) { // ignore invalid database exception } } } return empty ( $ this -> readerCache [ $ key ] ) ? false : $ this -> readerCache [ $ key ] ; }
Returns a GeoIP2 reader instance. Creates it if necessary.

@param string $key 'loc' or 'isp'. Determines the type of GeoIP database
to load.
@return Reader|false
Returns a GeoIP2 reader instance . Creates it if necessary .