Esempio n. 1
0
 public function __construct($ip, $safeMode = TRUE)
 {
     parent::__construct($ip, $safeMode);
     if ($this->getIpCountPart() != 8) {
         throw new IllegalArgumentException();
     }
 }
Esempio n. 2
0
 public function __construct($ip, $safeMode = TRUE)
 {
     parent::__construct($ip, $safeMode);
     if ($this->getIpCountPart() == 4) {
         $this->IPv = new IPv4($ip, $safeMode);
     } else {
         if ($this->getIpCountPart() == 8) {
             $this->IPv = new IPv6($ip, $safeMode);
         } else {
             throw new IllegalArgumentException();
         }
     }
 }