public static function isInstanceOf($value, $className, $message = null, $propertyPath = null)
{
if (!$value instanceof $className) {
$message = sprintf($message ?: 'Class "%s" was expected to be instanceof of "%s" but is not.', static::stringify($value), $className);
throw static::createException($value, $message, static::INVALID_INSTANCE_OF, $propertyPath, array('class' => $className));
}
return true;
}