Exemple #1
0
 /**
  * Test is the two blocks overlap, i.e. if block1 contains block2, or block2 contains block1
  *
  * @param $block mixed
  * @return bool
  */
 public function overlaps($block)
 {
     if (!$block instanceof IPBlock) {
         $block = new $this->class($block);
     }
     return !($block->getFirstIp()->numeric() > $this->last_ip->numeric() || $block->getLastIp()->numeric() < $this->first_ip->numeric());
 }