2015-08-20 06:17:24 +02:00
|
|
|
# CallableType
|
|
|
|
|
2017-03-27 14:47:07 +02:00
|
|
|
- `CallableType()`
|
2015-08-20 06:17:24 +02:00
|
|
|
|
2018-03-26 22:15:06 +02:00
|
|
|
Validates whether the pseudo-type of the input is [callable](http://php.net/types.callable).
|
2015-08-20 06:17:24 +02:00
|
|
|
|
|
|
|
```php
|
2015-10-20 02:53:25 +02:00
|
|
|
v::callableType()->validate(function () {}); // true
|
|
|
|
v::callableType()->validate('trim'); // true
|
2018-06-07 11:24:09 +02:00
|
|
|
v::callableType()->validate([new DateTime(), 'format']); // true
|
2015-08-20 06:17:24 +02:00
|
|
|
```
|
|
|
|
|
2019-05-11 18:32:13 +02:00
|
|
|
## Categorization
|
|
|
|
|
|
|
|
- Callables
|
|
|
|
- Types
|
|
|
|
|
2017-03-27 22:04:13 +02:00
|
|
|
## Changelog
|
|
|
|
|
|
|
|
Version | Description
|
|
|
|
--------|-------------
|
|
|
|
1.0.0 | Created
|
|
|
|
|
2015-08-20 06:38:41 +02:00
|
|
|
***
|
2015-08-20 06:17:24 +02:00
|
|
|
See also:
|
|
|
|
|
2017-03-28 11:53:14 +02:00
|
|
|
- [ArrayType](ArrayType.md)
|
|
|
|
- [BoolType](BoolType.md)
|
2018-12-11 13:31:50 +01:00
|
|
|
- [BoolVal](BoolVal.md)
|
2017-03-28 11:53:14 +02:00
|
|
|
- [Callback](Callback.md)
|
|
|
|
- [FloatType](FloatType.md)
|
|
|
|
- [IntType](IntType.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)
|
|
|
|
- [StringType](StringType.md)
|
2018-12-11 13:31:50 +01:00
|
|
|
- [StringVal](StringVal.md)
|
2017-03-28 11:53:14 +02:00
|
|
|
- [Type](Type.md)
|