function __construct($value) { parent::__construct($value); $this->ifIsEqualTo(new risingsun\ointeger\unsigned(), function () { throw new \domainException('Decimal part precision must be greater than 0'); }); }
function __construct($value) { $exception = null; try { parent::__construct($value); } catch (\domainException $exception) { } if ($exception || $value === 0) { throw new \domainException('String offset should be an integer greater than or equal to 0'); } }
function __construct($value) { $exception = null; try { parent::__construct($value); } catch (\domainException $exception) { } if ($exception || !self::isHttpStatus($value)) { throw new \domainException('HTTP status should be have an unsigned integer as defined by RFC 2616'); } }