PHP Class Nette\DI\PhpReflection

ファイルを表示 Open project: nette/di Class Usage Examples

Public Methods

Method Description
expandClassName ( $name, ReflectionClass $rc ) : string Expands class name into full name.
getClassTree ( ReflectionClass $class ) : string[] Returns class and all its descendants.
getDeclaringClass ( ReflectionProperty $prop ) : ReflectionClass Returns declaring class or trait.
getParameterType ( ReflectionParameter $param ) : string | null
getReturnType ( ReflectionFunctionAbstract $func ) : string | null
getUseStatements ( ReflectionClass $class ) : array
isBuiltinType ( $type ) : boolean
parseAnnotation ( Reflector $ref, $name ) : string | null Returns an annotation value.
parseUseStatements ( $code, $forClass = NULL ) : array Parses PHP code.

Private Methods

Method Description
fetch ( &$tokens, $take )

Method Details

expandClassName() public static method

Expands class name into full name.
public static expandClassName ( $name, ReflectionClass $rc ) : string
$rc ReflectionClass
return string full name

getClassTree() public static method

Returns class and all its descendants.
public static getClassTree ( ReflectionClass $class ) : string[]
$class ReflectionClass
return string[]

getDeclaringClass() public static method

Returns declaring class or trait.
public static getDeclaringClass ( ReflectionProperty $prop ) : ReflectionClass
$prop ReflectionProperty
return ReflectionClass

getParameterType() public static method

public static getParameterType ( ReflectionParameter $param ) : string | null
$param ReflectionParameter
return string | null

getReturnType() public static method

public static getReturnType ( ReflectionFunctionAbstract $func ) : string | null
$func ReflectionFunctionAbstract
return string | null

getUseStatements() public static method

public static getUseStatements ( ReflectionClass $class ) : array
$class ReflectionClass
return array of [alias => class]

isBuiltinType() public static method

public static isBuiltinType ( $type ) : boolean
return boolean

parseAnnotation() public static method

Returns an annotation value.
public static parseAnnotation ( Reflector $ref, $name ) : string | null
$ref Reflector
return string | null

parseUseStatements() public static method

Parses PHP code.
public static parseUseStatements ( $code, $forClass = NULL ) : array
return array of [class => [alias => class, ...]]