2015-01-30 09:40:06 +01:00
|
|
|
# Type
|
|
|
|
|
2017-03-27 14:47:07 +02:00
|
|
|
- `Type(string $type)`
|
2015-01-30 09:40:06 +01:00
|
|
|
|
|
|
|
Validates the type of input.
|
|
|
|
|
|
|
|
```php
|
2015-10-20 02:53:25 +02:00
|
|
|
v::type('bool')->validate(true); // true
|
|
|
|
v::type('callable')->validate(function (){}); // true
|
|
|
|
v::type('object')->validate(new stdClass()); // true
|
2015-01-30 09:40:06 +01:00
|
|
|
```
|
|
|
|
|
2019-05-11 18:32:13 +02:00
|
|
|
## Categorization
|
|
|
|
|
|
|
|
- Types
|
|
|
|
|
2017-03-27 22:04:13 +02:00
|
|
|
## Changelog
|
|
|
|
|
|
|
|
Version | Description
|
|
|
|
--------|-------------
|
2018-06-15 18:57:00 +02:00
|
|
|
2.0.0 | Became case-sensitive
|
2017-03-27 22:04:13 +02:00
|
|
|
0.8.0 | Created
|
|
|
|
|
2015-08-20 06:38:41 +02:00
|
|
|
***
|
|
|
|
See also:
|
2015-01-30 09:40:06 +01:00
|
|
|
|
2018-12-11 13:31:50 +01:00
|
|
|
- [ArrayType](ArrayType.md)
|
2017-03-28 11:53:14 +02:00
|
|
|
- [ArrayVal](ArrayVal.md)
|
|
|
|
- [BoolType](BoolType.md)
|
2018-12-11 13:31:50 +01:00
|
|
|
- [BoolVal](BoolVal.md)
|
2017-03-28 11:53:14 +02:00
|
|
|
- [CallableType](CallableType.md)
|
|
|
|
- [Finite](Finite.md)
|
|
|
|
- [FloatType](FloatType.md)
|
|
|
|
- [FloatVal](FloatVal.md)
|
|
|
|
- [Infinite](Infinite.md)
|
|
|
|
- [Instance](Instance.md)
|
|
|
|
- [IntType](IntType.md)
|
|
|
|
- [IntVal](IntVal.md)
|
|
|
|
- [NullType](NullType.md)
|
2018-12-11 13:31:50 +01:00
|
|
|
- [Number](Number.md)
|
2017-03-28 11:53:14 +02:00
|
|
|
- [ObjectType](ObjectType.md)
|
|
|
|
- [ResourceType](ResourceType.md)
|
|
|
|
- [ScalarVal](ScalarVal.md)
|
|
|
|
- [StringType](StringType.md)
|
2018-12-11 13:31:50 +01:00
|
|
|
- [StringVal](StringVal.md)
|