protected function ConstraintValidator::formatTypeOf in Plug 7
Returns a string representation of the type of the value.
This method should be used if you pass the type of a value as message parameter to a constraint violation. Note that such parameters should usually not be included in messages aimed at non-technical people.
Parameters
mixed $value The value to return the type of:
Return value
string The type of the value
File
- lib/
Symfony/ validator/ Symfony/ Component/ Validator/ ConstraintValidator.php, line 108
Class
- ConstraintValidator
- Base class for constraint validators.
Namespace
Symfony\Component\ValidatorCode
protected function formatTypeOf($value) {
return is_object($value) ? get_class($value) : gettype($value);
}