1<?php
2
3namespace GeoIp2\Model;
4
5/**
6 * This class provides the GeoIP2 Anonymous IP model.
7 *
8 * @property-read bool $isAnonymous This is true if the IP address belongs to
9 *     any sort of anonymous network.
10 * @property-read bool $isAnonymousVpn This is true if the IP address belongs to
11 *     an anonymous VPN system.
12 * @property-read bool $isHostingProvider This is true if the IP address belongs
13 *     to a hosting provider.
14 * @property-read bool $isPublicProxy This is true if the IP address belongs to
15 *     a public proxy.
16 * @property-read bool $isTorExitNode This is true if the IP address is a Tor
17 *     exit node.
18 * @property-read string $ipAddress The IP address that the data in the model is
19 *     for.
20 */
21class AnonymousIp extends AbstractModel
22{
23    protected $isAnonymous;
24    protected $isAnonymousVpn;
25    protected $isHostingProvider;
26    protected $isPublicProxy;
27    protected $isTorExitNode;
28    protected $ipAddress;
29
30    /**
31     * @ignore
32     *
33     * @param mixed $raw
34     */
35    public function __construct($raw)
36    {
37        parent::__construct($raw);
38
39        $this->isAnonymous = $this->get('is_anonymous');
40        $this->isAnonymousVpn = $this->get('is_anonymous_vpn');
41        $this->isHostingProvider = $this->get('is_hosting_provider');
42        $this->isPublicProxy = $this->get('is_public_proxy');
43        $this->isTorExitNode = $this->get('is_tor_exit_node');
44        $this->ipAddress = $this->get('ip_address');
45    }
46}
47