/**
  * 
  * 
  * @throws \InvalidArgumentException
  */
 public function __construct($param, $min, $max, $type)
 {
     if ($type > self::LOWER || $type < self::GREATER) {
         throw new InvalidArgumentException('不正な引数です.');
     }
     $this->type = $type;
     $params = array('value' => $param, 'max' => $max, 'min' => $min);
     $msg = $this->buildMessage($this->messageTmpls[$this->type], $params);
     parent::__construct($msg);
 }
Example #2
0
 /**
  * 
  * 
  */
 public function __construct($param, $type)
 {
     $params = array('value' => $param, 'type' => $type);
     $msg = $this->buildMessage($this->messageTmpls[$this->type], $params);
     parent::__construct($msg);
 }