Moodle PHP Documentation 5.1
Moodle 5.1dev (Build: 20250711) (9addea9f0ac)
GeoIp2\Record\Traits Class Reference
Inheritance diagram for GeoIp2\Record\Traits:

Public Member Functions

 __construct (array $record)
 @ignore
 
 jsonSerialize ()
 

Public Attributes

int null readonly int $autonomousSystemNumber
 The autonomous system number associated with the IP address.
 
string null readonly string $autonomousSystemOrganization
 The organization associated with the registered autonomous system number for the IP address.
 
string null readonly string $connectionType
 The connection type may take the following values: "Dialup", "Cable/DSL", "Corporate", "Cellular", and "Satellite".
 
string null readonly string $domain
 The second level domain associated with the IP address.
 
string null readonly string $ipAddress
 The IP address that the data in the model is for.
 
bool readonly bool $isAnonymous
 This is true if the IP address belongs to any sort of anonymous network.
 
bool readonly bool $isAnonymousVpn
 This is true if the IP address is registered to an anonymous VPN provider.
 
bool readonly bool $isAnycast
 This is true if the IP address belongs to an anycast network.
 
bool readonly bool $isHostingProvider
 This is true if the IP address belongs to a hosting or VPN provider (see description of isAnonymousVpn property).
 
bool readonly bool $isLegitimateProxy
 This attribute is true if MaxMind believes this IP address to be a legitimate proxy, such as an internal VPN used by a corporation.
 
string null readonly string $isp
 The name of the ISP associated with the IP address.
 
bool readonly bool $isPublicProxy
 This is true if the IP address belongs to a public proxy.
 
bool readonly bool $isResidentialProxy
 This is true if the IP address is on a suspected anonymizing network and belongs to a residential ISP.
 
bool readonly bool $isTorExitNode
 This is true if the IP address is a Tor exit node.
 
string null readonly string $mobileCountryCode
 The mobile country code (MCC) associated with the IP address and ISP.
 
string null readonly string $mobileNetworkCode
 The mobile network code (MNC) associated with the IP address and ISP.
 
string null readonly string $network
 The network in CIDR notation associated with the record.
 
string null readonly string $organization
 The name of the organization associated with the IP address.
 
float null readonly float $staticIpScore
 An indicator of how static or dynamic an IP address is.
 
int null readonly int $userCount
 The estimated number of users sharing the IP/network during the past 24 hours.
 
string null readonly string $userType
 

Constructor & Destructor Documentation

◆ __construct()

GeoIp2\Record\Traits::__construct ( array $record)

@ignore

Parameters
array<string,mixed>$record

Member Function Documentation

◆ jsonSerialize()

GeoIp2\Record\Traits::jsonSerialize ( )
Return values
array<string,mixed>

Member Data Documentation

◆ $autonomousSystemNumber

int null readonly int GeoIp2\Record\Traits::$autonomousSystemNumber

The autonomous system number associated with the IP address.

See https://en.wikipedia.org/wiki/Autonomous_system_(Internet%29. This attribute is only available from the City Plus and Insights web services and the GeoIP2 Enterprise database.

◆ $autonomousSystemOrganization

string null readonly string GeoIp2\Record\Traits::$autonomousSystemOrganization

The organization associated with the registered autonomous system number for the IP address.

See https://en.wikipedia.org/wiki/Autonomous_system_(Internet%29. This attribute is only available from the City Plus and Insights web services and the GeoIP2 Enterprise database.

◆ $connectionType

string null readonly string GeoIp2\Record\Traits::$connectionType

The connection type may take the following values: "Dialup", "Cable/DSL", "Corporate", "Cellular", and "Satellite".

Additional values may be added in the future. This attribute is only available from the City Plus and Insights web services and the GeoIP2 Enterprise database.

◆ $domain

string null readonly string GeoIp2\Record\Traits::$domain

The second level domain associated with the IP address.

This will be something like "example.com" or "example.co.uk", not "foo.example.com". This attribute is only available from the City Plus and Insights web services and the GeoIP2 Enterprise database.

◆ $ipAddress

string null readonly string GeoIp2\Record\Traits::$ipAddress

The IP address that the data in the model is for.

If you performed a "me" lookup against the web service, this will be the externally routable IP address for the system the code is running on. If the system is behind a NAT, this may differ from the IP address locally assigned to it. This attribute is returned by all end points.

◆ $isAnonymous

bool readonly bool GeoIp2\Record\Traits::$isAnonymous

This is true if the IP address belongs to any sort of anonymous network.

This property is only available from GeoIP2 Insights.

◆ $isAnonymousVpn

bool readonly bool GeoIp2\Record\Traits::$isAnonymousVpn

This is true if the IP address is registered to an anonymous VPN provider.

If a VPN provider does not register subnets under names associated with them, we will likely only flag their IP ranges using the isHostingProvider property. This property is only available from GeoIP2 Insights.

◆ $isAnycast

bool readonly bool GeoIp2\Record\Traits::$isAnycast

This is true if the IP address belongs to an anycast network.

This property is not available from GeoLite databases or web services.

◆ $isHostingProvider

bool readonly bool GeoIp2\Record\Traits::$isHostingProvider

This is true if the IP address belongs to a hosting or VPN provider (see description of isAnonymousVpn property).

This property is only available from GeoIP2 Insights.

◆ $isLegitimateProxy

bool readonly bool GeoIp2\Record\Traits::$isLegitimateProxy

This attribute is true if MaxMind believes this IP address to be a legitimate proxy, such as an internal VPN used by a corporation.

This attribute is only available in the GeoIP2 Enterprise database.

◆ $isp

string null readonly string GeoIp2\Record\Traits::$isp

The name of the ISP associated with the IP address.

This attribute is only available from the City Plus and Insights web services and the GeoIP2 Enterprise database.

◆ $isPublicProxy

bool readonly bool GeoIp2\Record\Traits::$isPublicProxy

This is true if the IP address belongs to a public proxy.

This property is only available from GeoIP2 Insights.

◆ $isResidentialProxy

bool readonly bool GeoIp2\Record\Traits::$isResidentialProxy

This is true if the IP address is on a suspected anonymizing network and belongs to a residential ISP.

This property is only available from GeoIP2 Insights.

◆ $isTorExitNode

bool readonly bool GeoIp2\Record\Traits::$isTorExitNode

This is true if the IP address is a Tor exit node.

This property is only available from GeoIP2 Insights.

◆ $mobileCountryCode

string null readonly string GeoIp2\Record\Traits::$mobileCountryCode

The mobile country code (MCC) associated with the IP address and ISP.

This property is available from the City Plus and Insights web services and the GeoIP2 Enterprise database.

◆ $mobileNetworkCode

string null readonly string GeoIp2\Record\Traits::$mobileNetworkCode

The mobile network code (MNC) associated with the IP address and ISP.

This property is available from the City Plus and Insights web services and the GeoIP2 Enterprise database.

◆ $network

string null readonly string GeoIp2\Record\Traits::$network

The network in CIDR notation associated with the record.

In particular, this is the largest network where all of the fields besides $ipAddress have the same value.

◆ $organization

string null readonly string GeoIp2\Record\Traits::$organization

The name of the organization associated with the IP address.

This attribute is only available from the City Plus and Insights web services and the GeoIP2 Enterprise database.

◆ $staticIpScore

float null readonly float GeoIp2\Record\Traits::$staticIpScore

An indicator of how static or dynamic an IP address is.

This property is only available from GeoIP2 Insights.

◆ $userCount

int null readonly int GeoIp2\Record\Traits::$userCount

The estimated number of users sharing the IP/network during the past 24 hours.

For IPv4, the count is for the individual IP. For IPv6, the count is for the /64 network. This property is only available from GeoIP2 Insights.

◆ $userType

string null readonly string GeoIp2\Record\Traits::$userType

The user type associated with the IP address. This can be one of the following values:

  • business
  • cafe
  • cellular
  • college
  • consumer_privacy_network
  • content_delivery_network
  • dialup
  • government
  • hosting
  • library
  • military
  • residential
  • router
  • school
  • search_engine_spider
  • traveler

This attribute is only available from the Insights web service and the GeoIP2 Enterprise database.


The documentation for this class was generated from the following file: