コード例 #1
0
ファイル: separator.php プロジェクト: estvoyage/csv
 function __construct($value = ',')
 {
     try {
         parent::__construct($value);
     } catch (\domainException $exception) {
         throw new csv\exception\domain('Separator should be a string');
     }
 }
コード例 #2
0
ファイル: eol.php プロジェクト: estvoyage/csv
 function __construct($value = "\r\n")
 {
     try {
         parent::__construct($value);
     } catch (\domainException $exception) {
         throw new csv\exception\domain('End-of-line should be a string');
     }
 }
コード例 #3
0
ファイル: data.php プロジェクト: estvoyage/data
 function __construct($value = '')
 {
     $domainException = null;
     try {
         parent::__construct($value);
     } catch (\domainException $domainException) {
         throw new exception\domain('Data should be a string');
     }
 }
コード例 #4
0
ファイル: notEmpty.php プロジェクト: estvoyage/value
 function __construct($value)
 {
     $domainException = null;
     try {
         parent::__construct($value);
     } catch (\domainException $domainException) {
     }
     if ($domainException || !self::isNotEmpty($value)) {
         throw new \domainException('Value should be a not empty string');
     }
 }
コード例 #5
0
ファイル: bucket.php プロジェクト: estvoyage/statsd
 function __construct($name)
 {
     $domainException = null;
     try {
         parent::__construct($name);
     } catch (\exception $domainException) {
     }
     if ($domainException || !self::containsAllowedCharacters($name)) {
         throw new \domainException('Bucket name should be a string which contains alphanumeric characters, -, +, _, {, }, [, ], %');
     }
 }
コード例 #6
0
ファイル: host.php プロジェクト: estvoyage/net
 function __construct($value)
 {
     $domainException = null;
     try {
         parent::__construct($value);
     } catch (\domainException $domainException) {
     }
     if ($domainException || !self::isHost($value)) {
         throw new \domainException('Value is not a valid host');
     }
 }
コード例 #7
0
ファイル: label.php プロジェクト: estvoyage/object
 function __construct($value)
 {
     $domainException = null;
     try {
         parent::__construct($value);
     } catch (\exception $domainException) {
     }
     if ($domainException || !self::isPhpLabel($value)) {
         throw new exception\domain('Label should be a string matching [a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*');
     }
 }