zendframework/zf2 — pull request #2414 by jvandemo (2012-09-25 09:26:02+00:00)
Title: Added a new validator to check if input is instance of certain class

Useful if you need to check if a value is an instance of a certain class.

Also useful as an annotation in your entity classes if you need to make sure that a certain class property is an instance of a specific class.

Example:

```php
$validator = new \Zend\Validator\IsInstanceOf(
array(
'className' => '\DateTime'
));

$validator->isValid(new \DateTime()); // true
$validator->isValid(new AnyObjectThatIsNotDateTime()); // false
$validator->isValid(''); // false
$validator->isValid(null); // false
```

Example as annotation:

```php
/*
* @Annotation\Validator({"name":"IsInstanceOf", "options":{"className":"\DateTime"}})
*/
```

Change-Id: I6365cf9a6652ca42a1f6897002e5abe455ed4f44