Overview

Namespaces

  • GeoIp2
    • Compat
    • Database
    • Exception
    • Model
    • Record
    • WebService
  • PHP

Classes

  • AbstractPlaceRecord
  • AbstractRecord
  • City
  • Continent
  • Country
  • Location
  • MaxMind
  • Postal
  • RepresentedCountry
  • Subdivision
  • Traits
  • Overview
  • Namespace
  • Class
  • Tree
 1: <?php
 2: 
 3: namespace GeoIp2\Record;
 4: 
 5: /**
 6:  * Contains data for the location record associated with an IP address
 7:  *
 8:  * This record is returned by all the end points except the Country end point.
 9:  *
10:  * @property int $averageIncome The average income in US dollars associated with
11:  * the requested IP address. This attribute is only available from the Insights
12:  * end point.
13:  *
14:  * @property int $accuracyRadius The radius in kilometers around the
15:  * specified location where the IP address is likely to be. This attribute
16:  * is only available from the Insights end point.
17:  *
18:  * @property float $latitude The latitude of the location as a floating
19:  * point number. This attribute is returned by all end points except the
20:  * Country end point.
21:  *
22:  * @property float $longitude The longitude of the location as a
23:  * floating point number. This attribute is returned by all end points
24:  * except the Country end point.
25:  *
26:  * @property int $populationDensity The estimated population per square
27:  * kilometer associated with the IP address. This attribute is only available
28:  * from the Insights end point.
29:  *
30:  * @property int $metroCode The metro code of the location if the location
31:  * is in the US. MaxMind returns the same metro codes as the
32:  * {@link
33:  * https://developers.google.com/adwords/api/docs/appendix/cities-DMAregions
34:  * Google AdWords API}. This attribute is returned by all end points except
35:  * the Country end point.
36:  *
37:  * @property string $timeZone The time zone associated with location, as
38:  * specified by the {@link http://www.iana.org/time-zones IANA Time Zone
39:  * Database}, e.g., "America/New_York". This attribute is returned by all
40:  * end points except the Country end point.
41:  */
42: class Location extends AbstractRecord
43: {
44:     /**
45:      * @ignore
46:      */
47:     protected $validAttributes = array(
48:         'averageIncome',
49:         'accuracyRadius',
50:         'latitude',
51:         'longitude',
52:         'metroCode',
53:         'populationDensity',
54:         'postalCode',
55:         'postalConfidence',
56:         'timeZone'
57:     );
58: }
59: 
GeoIP2 PHP API v2.3.2 API documentation generated by ApiGen