respect-validation/docs/rules/CallableType.md

40 lines
782 B
Markdown
Raw Permalink Normal View History

2015-08-20 06:17:24 +02:00
# CallableType
- `CallableType()`
2015-08-20 06:17:24 +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
v::callableType()->validate(function () {}); // true
v::callableType()->validate('trim'); // true
v::callableType()->validate([new DateTime(), 'format']); // true
2015-08-20 06:17:24 +02:00
```
## Categorization
- Callables
- Types
## Changelog
Version | Description
--------|-------------
1.0.0 | Created
***
2015-08-20 06:17:24 +02:00
See also:
- [ArrayType](ArrayType.md)
- [BoolType](BoolType.md)
2018-12-11 13:31:50 +01:00
- [BoolVal](BoolVal.md)
- [Callback](Callback.md)
- [FloatType](FloatType.md)
- [IntType](IntType.md)
- [NullType](NullType.md)
2018-12-11 13:31:50 +01:00
- [Number](Number.md)
- [ObjectType](ObjectType.md)
- [ResourceType](ResourceType.md)
- [StringType](StringType.md)
2018-12-11 13:31:50 +01:00
- [StringVal](StringVal.md)
- [Type](Type.md)