mirror of
https://github.com/Respect/Validation.git
synced 2024-06-08 16:52:16 +02:00
10df3211f5
Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
31 lines
551 B
Markdown
31 lines
551 B
Markdown
# Instance
|
|
|
|
- `Instance(string $instanceName)`
|
|
|
|
Validates if the input is an instance of the given class or interface.
|
|
|
|
```php
|
|
v::instance('DateTime')->validate(new DateTime); // true
|
|
v::instance('Traversable')->validate(new ArrayObject); // true
|
|
```
|
|
|
|
Message template for this validator includes `{{instanceName}}`.
|
|
|
|
## Categorization
|
|
|
|
- Objects
|
|
|
|
## Changelog
|
|
|
|
Version | Description
|
|
--------|-------------
|
|
0.3.9 | Created
|
|
|
|
***
|
|
See also:
|
|
|
|
- [Countable](Countable.md)
|
|
- [IterableType](IterableType.md)
|
|
- [ObjectType](ObjectType.md)
|
|
- [Type](Type.md)
|