コード例 #1
0
ファイル: PFloat.php プロジェクト: mai7star/primitive
 public function __construct($_ = 0.0)
 {
     if (is_double($_) != true) {
         throw new \Exception();
     }
     parent::__construct($_);
 }
コード例 #2
0
ファイル: PBool.php プロジェクト: mai7star/primitive
 public function __construct($_ = false)
 {
     if (is_bool($_) != true) {
         throw new \Exception();
     }
     parent::__construct($_);
 }
コード例 #3
0
ファイル: PString.php プロジェクト: mai7star/primitive
 public function __construct($_ = null)
 {
     if (is_null($_)) {
         $_ = 0;
     }
     if (is_string($_) != true) {
         throw new \Exception();
     }
     parent::__construct($_);
 }
コード例 #4
0
ファイル: PNull.php プロジェクト: mai7star/primitive
 public function __construct()
 {
     parent::__construct(null);
 }