class Type
Type value object (immutable).
BUILTIN_TYPE_INT | |
BUILTIN_TYPE_FLOAT | |
BUILTIN_TYPE_STRING | |
BUILTIN_TYPE_BOOL | |
BUILTIN_TYPE_RESOURCE | |
BUILTIN_TYPE_OBJECT | |
BUILTIN_TYPE_ARRAY | |
BUILTIN_TYPE_NULL | |
BUILTIN_TYPE_CALLABLE | |
BUILTIN_TYPE_ITERABLE |
static string[] | $builtinTypes | List of PHP builtin types. |
__construct(string $builtinType, bool $nullable = false, string $class = null, bool $collection = false, Type $collectionKeyType = null, Type $collectionValueType = null) | ||
string | getBuiltinType() Gets built-in type. | |
bool | isNullable() | |
string|null | getClassName() Gets the class name. | |
bool | isCollection() | |
Type|null | getCollectionKeyType() Gets collection key type. | |
Type|null | getCollectionValueType() Gets collection value type. |
string | $builtinType | |
bool | $nullable | |
string | $class | |
bool | $collection | |
Type | $collectionKeyType | |
Type | $collectionValueType |
InvalidArgumentException |
Gets built-in type.
Can be bool, int, float, string, array, object, resource, null, callback or iterable.
string |
bool |
Gets the class name.
Only applicable if the built-in type is object.
string|null |
bool |
Gets collection key type.
Only applicable for a collection type.
Type|null |
Gets collection value type.
Only applicable for a collection type.
Type|null |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/PropertyInfo/Type.html