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