Copied!

Represents a generic type, which is a type that holds variable parts.

It proxies every method to the main type and adds methods related to variable types.

CloneableFinalInstantiable
Methods
public __call(string $method, array $arguments) : ?mixed
 

Proxies all method calls to the original type.

  • param list $arguments
public __construct(Symfony\Component\TypeInfo\Type\BuiltinType|Symfony\Component\TypeInfo\Type\ObjectType $type, Symfony\Component\TypeInfo\Type $variableTypes)
 
  • param \T $type
public __toString() : string
public static Symfony\Component\TypeInfo\Type::array(?Symfony\Component\TypeInfo\Type $value = NULL, ?Symfony\Component\TypeInfo\Type $key = NULL, bool $asList = false) : Symfony\Component\TypeInfo\Type\CollectionType
 
  • return \CollectionType<\BuiltinType<\TypeIdentifier::ARRAY>>
public asNonNullable() : self
public static Symfony\Component\TypeInfo\Type::bool() : Symfony\Component\TypeInfo\Type\BuiltinType
 
  • return \BuiltinType<\TypeIdentifier::BOOL>
public static Symfony\Component\TypeInfo\Type::builtin(Symfony\Component\TypeInfo\TypeIdentifier|string $identifier) : Symfony\Component\TypeInfo\Type\BuiltinType
 
  • template T of TypeIdentifier
  • template U value-of<T>
  • param \T|\U $identifier
  • return \BuiltinType<\T>
public static Symfony\Component\TypeInfo\Type::callable() : Symfony\Component\TypeInfo\Type\BuiltinType
 
  • return \BuiltinType<\TypeIdentifier::CALLABLE>
public static Symfony\Component\TypeInfo\Type::collection(Symfony\Component\TypeInfo\Type\BuiltinType|Symfony\Component\TypeInfo\Type\ObjectType|Symfony\Component\TypeInfo\Type\GenericType $type, ?Symfony\Component\TypeInfo\Type $value = NULL, ?Symfony\Component\TypeInfo\Type $key = NULL, bool $asList = false) : Symfony\Component\TypeInfo\Type\CollectionType
 
public static Symfony\Component\TypeInfo\Type::dict(?Symfony\Component\TypeInfo\Type $value = NULL) : Symfony\Component\TypeInfo\Type\CollectionType
 
  • return \CollectionType<\BuiltinType<\TypeIdentifier::ARRAY>>
public static Symfony\Component\TypeInfo\Type::enum(string $className, ?Symfony\Component\TypeInfo\Type\BuiltinType $backingType = NULL) : Symfony\Component\TypeInfo\Type\EnumType
 
public static Symfony\Component\TypeInfo\Type::false() : Symfony\Component\TypeInfo\Type\BuiltinType
 
  • return \BuiltinType<\TypeIdentifier::FALSE>
public static Symfony\Component\TypeInfo\Type::float() : Symfony\Component\TypeInfo\Type\BuiltinType
 
  • return \BuiltinType<\TypeIdentifier::FLOAT>
public static Symfony\Component\TypeInfo\Type::generic(Symfony\Component\TypeInfo\Type $mainType, Symfony\Component\TypeInfo\Type $variableTypes) : Symfony\Component\TypeInfo\Type\GenericType
 
public getBaseType() : Symfony\Component\TypeInfo\Type\BuiltinType|Symfony\Component\TypeInfo\Type\ObjectType
public getType() : Symfony\Component\TypeInfo\Type\BuiltinType|Symfony\Component\TypeInfo\Type\ObjectType
 
  • return \T
public getVariableTypes() : array
 
  • return list<\Type>
public static Symfony\Component\TypeInfo\Type::int() : Symfony\Component\TypeInfo\Type\BuiltinType
 
  • return \BuiltinType<\TypeIdentifier::INT>
public static Symfony\Component\TypeInfo\Type::intersection(Symfony\Component\TypeInfo\Type $types) : Symfony\Component\TypeInfo\Type\IntersectionType
 
  • template T of Type
  • param list<\T> $types
  • return \IntersectionType<\Type>
public Symfony\Component\TypeInfo\Type::is(callable $callable) : bool
 
  • param callable $callable
public isA(Symfony\Component\TypeInfo\TypeIdentifier|string $subject) : bool
public Symfony\Component\TypeInfo\Type::isNullable() : bool
public static Symfony\Component\TypeInfo\Type::iterable(?Symfony\Component\TypeInfo\Type $value = NULL, ?Symfony\Component\TypeInfo\Type $key = NULL, bool $asList = false) : Symfony\Component\TypeInfo\Type\CollectionType
 
  • return \CollectionType<\BuiltinType<\TypeIdentifier::ITERABLE>>
public static Symfony\Component\TypeInfo\Type::list(?Symfony\Component\TypeInfo\Type $value = NULL) : Symfony\Component\TypeInfo\Type\CollectionType
 
  • return \CollectionType<\BuiltinType<\TypeIdentifier::ARRAY>>
public static Symfony\Component\TypeInfo\Type::mixed() : Symfony\Component\TypeInfo\Type\BuiltinType
 
  • return \BuiltinType<\TypeIdentifier::MIXED>
public static Symfony\Component\TypeInfo\Type::never() : Symfony\Component\TypeInfo\Type\BuiltinType
 
  • return \BuiltinType<\TypeIdentifier::NEVER>
public static Symfony\Component\TypeInfo\Type::null() : Symfony\Component\TypeInfo\Type\BuiltinType
 
  • return \BuiltinType<\TypeIdentifier::NULL>
public static Symfony\Component\TypeInfo\Type::nullable(Symfony\Component\TypeInfo\Type $type) : Symfony\Component\TypeInfo\Type\UnionType
 
  • template T of Type
  • param \T $type
  • return mixed
public static Symfony\Component\TypeInfo\Type::object(?string $className = NULL) : Symfony\Component\TypeInfo\Type\BuiltinType|Symfony\Component\TypeInfo\Type\ObjectType
 
  • template T of class-string
  • param \T|null $className
  • return mixed
public static Symfony\Component\TypeInfo\Type::resource() : Symfony\Component\TypeInfo\Type\BuiltinType
 
  • return \BuiltinType<\TypeIdentifier::RESOURCE>
public static Symfony\Component\TypeInfo\Type::string() : Symfony\Component\TypeInfo\Type\BuiltinType
 
  • return \BuiltinType<\TypeIdentifier::STRING>
public static Symfony\Component\TypeInfo\Type::template(string $name, ?Symfony\Component\TypeInfo\Type $bound = NULL) : Symfony\Component\TypeInfo\Type\TemplateType
public static Symfony\Component\TypeInfo\Type::true() : Symfony\Component\TypeInfo\Type\BuiltinType
 
  • return \BuiltinType<\TypeIdentifier::TRUE>
public static Symfony\Component\TypeInfo\Type::union(Symfony\Component\TypeInfo\Type $types) : Symfony\Component\TypeInfo\Type\UnionType
 
  • template T of Type
  • param list<\T> $types
  • return \UnionType<\Type>
public static Symfony\Component\TypeInfo\Type::void() : Symfony\Component\TypeInfo\Type\BuiltinType
 
  • return \BuiltinType<\TypeIdentifier::VOID>
Properties
private readonly Symfony\Component\TypeInfo\Type\BuiltinType|Symfony\Component\TypeInfo\Type\ObjectType $type
private readonly array $variableTypes
 
  • var list<\Type>
Methods
public static Symfony\Component\TypeInfo\Type::array(?Symfony\Component\TypeInfo\Type $value = NULL, ?Symfony\Component\TypeInfo\Type $key = NULL, bool $asList = false) : Symfony\Component\TypeInfo\Type\CollectionType
 
  • return \CollectionType<\BuiltinType<\TypeIdentifier::ARRAY>>
public static Symfony\Component\TypeInfo\Type::bool() : Symfony\Component\TypeInfo\Type\BuiltinType
 
  • return \BuiltinType<\TypeIdentifier::BOOL>
public static Symfony\Component\TypeInfo\Type::builtin(Symfony\Component\TypeInfo\TypeIdentifier|string $identifier) : Symfony\Component\TypeInfo\Type\BuiltinType
 
  • template T of TypeIdentifier
  • template U value-of<T>
  • param \T|\U $identifier
  • return \BuiltinType<\T>
public static Symfony\Component\TypeInfo\Type::callable() : Symfony\Component\TypeInfo\Type\BuiltinType
 
  • return \BuiltinType<\TypeIdentifier::CALLABLE>
public static Symfony\Component\TypeInfo\Type::collection(Symfony\Component\TypeInfo\Type\BuiltinType|Symfony\Component\TypeInfo\Type\ObjectType|Symfony\Component\TypeInfo\Type\GenericType $type, ?Symfony\Component\TypeInfo\Type $value = NULL, ?Symfony\Component\TypeInfo\Type $key = NULL, bool $asList = false) : Symfony\Component\TypeInfo\Type\CollectionType
 
public static Symfony\Component\TypeInfo\Type::dict(?Symfony\Component\TypeInfo\Type $value = NULL) : Symfony\Component\TypeInfo\Type\CollectionType
 
  • return \CollectionType<\BuiltinType<\TypeIdentifier::ARRAY>>
public static Symfony\Component\TypeInfo\Type::enum(string $className, ?Symfony\Component\TypeInfo\Type\BuiltinType $backingType = NULL) : Symfony\Component\TypeInfo\Type\EnumType
 
public static Symfony\Component\TypeInfo\Type::false() : Symfony\Component\TypeInfo\Type\BuiltinType
 
  • return \BuiltinType<\TypeIdentifier::FALSE>
public static Symfony\Component\TypeInfo\Type::float() : Symfony\Component\TypeInfo\Type\BuiltinType
 
  • return \BuiltinType<\TypeIdentifier::FLOAT>
public static Symfony\Component\TypeInfo\Type::generic(Symfony\Component\TypeInfo\Type $mainType, Symfony\Component\TypeInfo\Type $variableTypes) : Symfony\Component\TypeInfo\Type\GenericType
 
public static Symfony\Component\TypeInfo\Type::int() : Symfony\Component\TypeInfo\Type\BuiltinType
 
  • return \BuiltinType<\TypeIdentifier::INT>
public static Symfony\Component\TypeInfo\Type::intersection(Symfony\Component\TypeInfo\Type $types) : Symfony\Component\TypeInfo\Type\IntersectionType
 
  • template T of Type
  • param list<\T> $types
  • return \IntersectionType<\Type>
public static Symfony\Component\TypeInfo\Type::iterable(?Symfony\Component\TypeInfo\Type $value = NULL, ?Symfony\Component\TypeInfo\Type $key = NULL, bool $asList = false) : Symfony\Component\TypeInfo\Type\CollectionType
 
  • return \CollectionType<\BuiltinType<\TypeIdentifier::ITERABLE>>
public static Symfony\Component\TypeInfo\Type::list(?Symfony\Component\TypeInfo\Type $value = NULL) : Symfony\Component\TypeInfo\Type\CollectionType
 
  • return \CollectionType<\BuiltinType<\TypeIdentifier::ARRAY>>
public static Symfony\Component\TypeInfo\Type::mixed() : Symfony\Component\TypeInfo\Type\BuiltinType
 
  • return \BuiltinType<\TypeIdentifier::MIXED>
public static Symfony\Component\TypeInfo\Type::never() : Symfony\Component\TypeInfo\Type\BuiltinType
 
  • return \BuiltinType<\TypeIdentifier::NEVER>
public static Symfony\Component\TypeInfo\Type::null() : Symfony\Component\TypeInfo\Type\BuiltinType
 
  • return \BuiltinType<\TypeIdentifier::NULL>
public static Symfony\Component\TypeInfo\Type::nullable(Symfony\Component\TypeInfo\Type $type) : Symfony\Component\TypeInfo\Type\UnionType
 
  • template T of Type
  • param \T $type
  • return mixed
public static Symfony\Component\TypeInfo\Type::object(?string $className = NULL) : Symfony\Component\TypeInfo\Type\BuiltinType|Symfony\Component\TypeInfo\Type\ObjectType
 
  • template T of class-string
  • param \T|null $className
  • return mixed
public static Symfony\Component\TypeInfo\Type::resource() : Symfony\Component\TypeInfo\Type\BuiltinType
 
  • return \BuiltinType<\TypeIdentifier::RESOURCE>
public static Symfony\Component\TypeInfo\Type::string() : Symfony\Component\TypeInfo\Type\BuiltinType
 
  • return \BuiltinType<\TypeIdentifier::STRING>
public static Symfony\Component\TypeInfo\Type::template(string $name, ?Symfony\Component\TypeInfo\Type $bound = NULL) : Symfony\Component\TypeInfo\Type\TemplateType
public static Symfony\Component\TypeInfo\Type::true() : Symfony\Component\TypeInfo\Type\BuiltinType
 
  • return \BuiltinType<\TypeIdentifier::TRUE>
public static Symfony\Component\TypeInfo\Type::union(Symfony\Component\TypeInfo\Type $types) : Symfony\Component\TypeInfo\Type\UnionType
 
  • template T of Type
  • param list<\T> $types
  • return \UnionType<\Type>
public static Symfony\Component\TypeInfo\Type::void() : Symfony\Component\TypeInfo\Type\BuiltinType
 
  • return \BuiltinType<\TypeIdentifier::VOID>
© 2024 Bruce Wells
Search Namespaces \ Classes
Configuration