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