Example #1
0
 public function __construct($value = '')
 {
     if (!is_string($value)) {
         throw new InvalidArgumentException("not a string");
     }
     parent::__construct($value);
 }
Example #2
0
 public function __construct($value)
 {
     if (!is_int($value)) {
         throw new InvalidArgumentException("not an integer");
     }
     parent::__construct($value);
 }
Example #3
0
 public function __construct($value)
 {
     if (!is_bool($value)) {
         throw new InvalidArgumentException("not a boolean");
     }
     parent::__construct($value);
 }