original_string: private function getGeoIpInstance($key)
      {
          if (empty($this->geoIpCache[$key])) {
              // make sure region names are loaded & saved first
              parent::getRegionNames();
              require_once PIWIK_INCLUDE_PATH . '/libs/MaxMindGeoIP/geoipcity.inc';
  
              $pathToDb = self::getPathToGeoIpDatabase($this->customDbNames[$key]);
              if ($pathToDb !== false) {
                  $this->geoIpCache[$key] = geoip_open($pathToDb, GEOIP_STANDARD); // TODO support shared memory
              }
          }
  
          return empty($this->geoIpCache[$key]) ? false : $this->geoIpCache[$key];
      }
code: private function getGeoIpInstance($key)
      {
          if (empty($this->geoIpCache[$key])) {
              // make sure region names are loaded & saved first
              parent::getRegionNames();
              require_once PIWIK_INCLUDE_PATH . '/libs/MaxMindGeoIP/geoipcity.inc';
  
              $pathToDb = self::getPathToGeoIpDatabase($this->customDbNames[$key]);
              if ($pathToDb !== false) {
                  $this->geoIpCache[$key] = geoip_open($pathToDb, GEOIP_STANDARD); // TODO support shared memory
              }
          }
  
          return empty($this->geoIpCache[$key]) ? false : $this->geoIpCache[$key];
      }
code_tokens: private function getGeoIpInstance ( $ key ) { if ( empty ( $ this -> geoIpCache [ $ key ] ) ) { // make sure region names are loaded & saved first parent :: getRegionNames ( ) ; require_once PIWIK_INCLUDE_PATH . '/libs/MaxMindGeoIP/geoipcity.inc' ; $ pathToDb = self :: getPathToGeoIpDatabase ( $ this -> customDbNames [ $ key ] ) ; if ( $ pathToDb !== false ) { $ this -> geoIpCache [ $ key ] = geoip_open ( $ pathToDb , GEOIP_STANDARD ) ; // TODO support shared memory } } return empty ( $ this -> geoIpCache [ $ key ] ) ? false : $ this -> geoIpCache [ $ key ] ; }
docstring: Returns a GeoIP instance. Creates it if necessary.
  
  @param string $key 'loc', 'isp' or 'org'. Determines the type of GeoIP database
  to load.
  @return object|false
docstring_tokens: Returns a GeoIP instance . Creates it if necessary .