Exemple #1
0
 public function __construct($debug)
 {
     if (!Validator::isBool($debug)) {
         throw new IllegalArgumentException();
     }
     $this->debug = $debug;
 }
Exemple #2
0
 public function antialias($enable = TRUE)
 {
     if (!Validator::isBool($enable)) {
         throw new IllegalArgumentException();
     }
     return imageantialias($this->imageResource, $enable);
 }
Exemple #3
0
 public function __construct($boolean)
 {
     parent::__construct();
     if (!Validator::isBool($boolean)) {
         throw new IllegalArgumentException();
     }
     $this->boolean = $boolean;
 }
Exemple #4
0
 public function __construct($ip, $safeMode = TRUE)
 {
     parent::__construct();
     if ($ip == NULL) {
         $ip = Server::get('remote_addr');
     }
     if (!self::isIP($ip)) {
         throw new IllegalArgumentException();
     }
     if (!Validator::isBool($safeMode)) {
         throw new IllegalArgumentException();
     }
     if (self::isIPv4($ip)) {
         $this->ipCoded = ip2long($ip);
         $this->ipParted = explode('.', $ip);
     } else {
         $this->ipCoded = self::ip6pack($ip);
         $this->ipParted = explode(':', $ip);
     }
     $this->ipCountPart = count($this->ipParted);
     $this->safeMode = $safeMode;
 }