コード例 #1
0
ファイル: IPv6.php プロジェクト: rendix2/QW_MVS
 public function __construct($ip, $safeMode = TRUE)
 {
     parent::__construct($ip, $safeMode);
     if ($this->getIpCountPart() != 8) {
         throw new IllegalArgumentException();
     }
 }
コード例 #2
0
ファイル: IPvU.php プロジェクト: rendix2/QW_MVS
 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();
         }
     }
 }