コード例 #1
0
ファイル: unsigned.php プロジェクト: estvoyage/risingsun
 function __construct($value = 0)
 {
     $domainException = null;
     try {
         parent::__construct($value);
     } catch (\domainException $domainException) {
     }
     if ($domainException || !self::isUnsigned($value)) {
         throw new \domainException('Value should be an integer greater than or equal to 0');
     }
 }
コード例 #2
0
ファイル: divisor.php プロジェクト: estvoyage/risingsun
 function __construct($value)
 {
     $exception = null;
     try {
         parent::__construct($value);
     } catch (\exception $exception) {
     }
     if ($exception || !$value) {
         throw new \domainException('Divisor should be an integer not equal to 0');
     }
 }