Documentation

TypeContext
in package

FinalYes

Type resolving context.

Helps to retrieve declaring class, called class, parent class, templates and normalize classes according to the current namespace and uses.

Tags
author

Mathias Arlaud mathias.arlaud@gmail.com

author

Baptiste Leduc baptiste.leduc@gmail.com

Table of Contents

Properties

$calledClassName  : string
$declaringClassName  : string
$namespace  : string|null
$templates  : array<string|int, mixed>
$typeAliases  : array<string|int, mixed>
$uses  : array<string|int, mixed>
$classExistCache  : array<string, bool>

Methods

__construct()  : mixed
getCalledClass()  : class-string
getDeclaringClass()  : class-string
getParentClass()  : class-string
normalize()  : string
Normalize class name according to current namespace and uses.

Properties

$calledClassName read-only

public string $calledClassName

$declaringClassName read-only

public string $declaringClassName

$namespace read-only

public string|null $namespace = null

$templates read-only

public array<string|int, mixed> $templates = []

$typeAliases read-only

public array<string|int, mixed> $typeAliases = []

$uses read-only

public array<string|int, mixed> $uses = []

$classExistCache

private static array<string, bool> $classExistCache = []

Methods

__construct()

public __construct(string $calledClassName, string $declaringClassName[, string|null $namespace = null ][, array<string, string> $uses = [] ][, array<string, Type$templates = [] ][, array<string, Type$typeAliases = [] ]) : mixed
Parameters
$calledClassName : string
$declaringClassName : string
$namespace : string|null = null
$uses : array<string, string> = []
$templates : array<string, Type> = []
$typeAliases : array<string, Type> = []

getCalledClass()

public getCalledClass() : class-string
Return values
class-string

getDeclaringClass()

public getDeclaringClass() : class-string
Return values
class-string

getParentClass()

public getParentClass() : class-string
Return values
class-string

normalize()

Normalize class name according to current namespace and uses.

public normalize(string $name) : string
Parameters
$name : string
Return values
string

        
On this page

Search results