Esempio n. 1
0
 public function __construct($debug)
 {
     if (!Validator::isBool($debug)) {
         throw new IllegalArgumentException();
     }
     $this->debug = $debug;
 }
Esempio n. 2
0
 public function antialias($enable = TRUE)
 {
     if (!Validator::isBool($enable)) {
         throw new IllegalArgumentException();
     }
     return imageantialias($this->imageResource, $enable);
 }
Esempio n. 3
0
 public function __construct($boolean)
 {
     parent::__construct();
     if (!Validator::isBool($boolean)) {
         throw new IllegalArgumentException();
     }
     $this->boolean = $boolean;
 }
Esempio n. 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;
 }