Type value object (immutable).
- author Kévin Dunglas
- final
CloneableInstantiable
Constants |
public Symfony |
public Symfony |
public Symfony |
public Symfony |
public Symfony |
public Symfony |
public Symfony |
public Symfony |
public Symfony |
public Symfony |
public Symfony |
public Symfony |
Properties |
public static array $builtinCollectionTypes = ['array', 'iterable'] List of PHP builtin collection types.
|
public static array $builtinTypes = ['int', 'float', 'string', 'bool', 'resource', 'object', 'array', 'callable', 'false', 'true', 'null', 'iterable'] List of PHP builtin types.
|
Methods |
public __construct(string $builtinType, bool $nullable = false, ?string $class = NULL, bool $collection = false, self|array|?null $collectionKeyType = NULL, self|array|?null $collectionValueType = NULL)
|
public getBuiltinType() : string Gets built-in type. Can be bool, int, float, string, array, object, resource, null, callback or iterable. |
public getClassName() : ?string Gets the class name. Only applicable if the built-in type is object. |
public getCollectionKeyTypes() : array Gets collection key types. Only applicable for a collection type.
|
public getCollectionValueTypes() : array Gets collection value types. Only applicable for a collection type.
|
public isCollection() : bool |
public isNullable() : bool |
Properties |
private string $builtinType |
private ?string $class |
private bool $collection |
private array $collectionKeyType |
private array $collectionValueType |
private bool $nullable |
Methods |
private validateCollectionArgument(self|array|?null $collectionArgument, int $argumentIndex, string $argumentName) : ?array |
Properties |
public static array $builtinCollectionTypes = ['array', 'iterable'] List of PHP builtin collection types.
|
public static array $builtinTypes = ['int', 'float', 'string', 'bool', 'resource', 'object', 'array', 'callable', 'false', 'true', 'null', 'iterable'] List of PHP builtin types.
|