Свойство | Тип | Описание | |
---|---|---|---|
$name | string | The name of this type such as 'int' or 'MyClass' | |
$namespace | string | The namespace of this type such as '\' or '\Phan\Language' | |
$template_parameter_type_list | UnionType[] | A possibly empty list of concrete types that act as parameters to this type if it is a templated type. | |
$template_parameter_type_list | A possibly empty list of concrete types that act as parameters to this type if it is a templated type. |
Метод | Описание | |
---|---|---|
__toString ( ) : string | ||
asExpandedTypes ( |
||
asExpandedTypes ( |
||
asFQSEN ( ) : Phan\Language\FQSEN | ||
asFQSENString ( ) : string | ||
asGenericArrayType ( ) : |
||
asUnionType ( ) : UnionType | ||
asUnionType ( ) : |
||
canCastToType ( |
||
fromFullyQualifiedString ( string $fully_qualified_string ) : |
||
fromInternalTypeName ( string $type_name ) : |
||
fromNamespaceAndName ( string $namespace, string $type_name ) : |
||
fromObject ( $object ) : |
||
fromStringInContext ( string $string, |
||
fromType ( |
||
fromType ( |
||
genericArrayElementType ( ) : |
||
getName ( ) : string | ||
getNamespace ( ) : string | ||
getTemplateParameterTypeList ( ) : UnionType[] | ||
getTemplateParameterTypeList ( ) : |
||
getTemplateParameterTypeMap ( |
||
hasNamespace ( ) : boolean | ||
hasTemplateParameterTypes ( ) : boolean | ||
isArrayLike ( ) : boolean | ||
isGenericArray ( ) : boolean | ||
isNativeType ( ) : boolean | ||
isScalar ( ) : boolean | ||
isSelfType ( ) : boolean | ||
isSelfTypeString ( string $type_string ) : boolean | ||
isStaticType ( ) : boolean | ||
isSubclassOf ( |
Метод | Описание | |
---|---|---|
__construct ( string $namespace, string $name, UnionType[] $template_parameter_type_list ) | ||
__construct ( string $namespace, string $name, |
||
make ( string $namespace, string $type_name, UnionType[] $template_parameter_type_list ) : |
||
make ( string $namespace, string $type_name, |
Метод | Описание | |
---|---|---|
canonicalNameFromName ( string $name ) : string | ||
isGenericArrayString ( string $type_name ) : boolean | ||
isNativeTypeString ( string $type_name ) : boolean | ||
typeStringComponents ( string $type_string ) : Tuple3 |
protected __construct ( string $namespace, string $name, UnionType[] $template_parameter_type_list ) | ||
$namespace | string | The (optional) namespace of the type such as '\' or '\Phan\Language'. |
$name | string | The name of the type such as 'int' or 'MyClass' |
$template_parameter_type_list | UnionType[] | A (possibly empty) list of template parameter types |
protected __construct ( string $namespace, string $name, |
||
$namespace | string | The (optional) namespace of the type such as '\' or '\Phan\Language'. |
$name | string | The name of the type such as 'int' or 'MyClass' |
$template_parameter_type_list | A (possibly empty) list of template parameter types |
public __toString ( ) : string | ||
Результат | string | A human readable representation of this type |
public asExpandedTypes ( |
||
$code_base | ||
$recursion_depth | integer | This thing has a tendency to run-away on me. This tracks how bad I messed up by seeing how far the expanded types go |
Результат | UnionType | Expands class types to all inherited classes returning a superset of this type. |
public asExpandedTypes ( |
||
$code_base | ||
$recursion_depth | integer | This thing has a tendency to run-away on me. This tracks how bad I messed up by seeing how far the expanded types go |
Результат | Expands class types to all inherited classes returning a superset of this type. |
public asFQSEN ( ) : Phan\Language\FQSEN | ||
Результат | Phan\Language\FQSEN | A fully-qualified structural element name derived from this type |
public asFQSENString ( ) : string | ||
Результат | string | A string representation of this type in FQSEN form. |
public asGenericArrayType ( ) : |
||
Результат | Get a new type which is the generic array version of this type. For instance, 'int' will produce 'int[]'. |
public asUnionType ( ) : UnionType | ||
Результат | UnionType | A UnionType representing this and only this type |
public asUnionType ( ) : |
||
Результат | A UnionType representing this and only this type |
public canCastToType ( |
||
$type | ||
Результат | boolean | True if this Type can be cast to the given Type cleanly |
public static fromFullyQualifiedString ( string $fully_qualified_string ) : |
||
$fully_qualified_string | string | A fully qualified type name |
Результат |
public static fromInternalTypeName ( string $type_name ) : |
||
$type_name | string | The name of the internal type such as 'int' |
Результат | Get a type for the given type name |
public static fromNamespaceAndName ( string $namespace, string $type_name ) : |
||
$namespace | string | A fully qualified namespace |
$type_name | string | The name of the type |
Результат | A type representing the given namespace and type name. |
public static fromObject ( $object ) : |
||
Результат | Get a type for the given object |
public static fromStringInContext ( string $string, |
||
$string | string | A string representing a type |
$context | The context in which the type string was found | |
Результат | Parse a type from the given string |
public static fromType ( |
||
$type | The base type of this generic type referencing a generic class | |
$template_parameter_type_list | UnionType[] | A map from a template type identifier to a concrete union type |
Результат |
public static fromType ( |
||
$type | The base type of this generic type referencing a generic class | |
$template_parameter_type_list | A map from a template type identifier to a concrete union type | |
Результат |
public genericArrayElementType ( ) : |
||
Результат | A variation of this type that is not generic. i.e. 'int[]' becomes 'int'. |
public getNamespace ( ) : string | ||
Результат | string | The namespace associated with this type |
public getTemplateParameterTypeList ( ) : UnionType[] | ||
Результат | UnionType[] | The set of types filling in template parameter types defined on the class specified by this type. |
public getTemplateParameterTypeList ( ) : |
||
Результат | The set of types filling in template parameter types defined on the class specified by this type. |
public getTemplateParameterTypeMap ( |
||
$code_base | The code base to look up classes against | |
Результат | A map from template type identifier to a concrete type |
public hasNamespace ( ) : boolean | ||
Результат | boolean | True if this namespace is defined |
public hasTemplateParameterTypes ( ) : boolean | ||
Результат | boolean | True if this type has any template parameter types |
public isArrayLike ( ) : boolean | ||
Результат | boolean | True if this type is array-like (is of type array, is a generic array, or implements ArrayAccess). |
public isGenericArray ( ) : boolean | ||
Результат | boolean | True if this is a generic type such as 'int[]' or 'string[]'. |
public isNativeType ( ) : boolean | ||
Результат | boolean | True if this is a native type (like int, string, etc.) |
public isSelfType ( ) : boolean | ||
Результат | boolean | True if this type is a type referencing the class context in which it exists such as 'static' or 'self'. |
public static isSelfTypeString ( string $type_string ) : boolean | ||
$type_string | string | A string defining a type such as 'self' or 'int'. |
Результат | boolean | True if the given type references the class context in which it exists such as 'static' or 'self'. |
public isStaticType ( ) : boolean | ||
Результат | boolean | True if this type is a type referencing the class context 'static'. |
public isSubclassOf ( |
||
$code_base | ||
$parent |
protected static make ( string $namespace, string $type_name, UnionType[] $template_parameter_type_list ) : |
||
$namespace | string | The (optional) namespace of the type such as '\' or '\Phan\Language'. |
$type_name | string | |
$template_parameter_type_list | UnionType[] | A (possibly empty) list of template parameter types |
Результат | A single canonical instance of the given type. |
protected static make ( string $namespace, string $type_name, |
||
$namespace | string | The (optional) namespace of the type such as '\' or '\Phan\Language'. |
$type_name | string | |
$template_parameter_type_list | A (possibly empty) list of template parameter types | |
Результат | A single canonical instance of the given type. |
protected string $name | ||
Результат | string |
protected string $namespace | ||
Результат | string |
protected UnionType[] $template_parameter_type_list | ||
Результат | UnionType[] |