ClassUnit
extends CodeUnit
in package
FinalYes
Tags
Table of Contents
Properties
- $name : string
- $sourceFileName : string
- $sourceLines : array<string|int, mixed>
Methods
- forClass() : ClassUnit
- forClassMethod() : ClassMethodUnit
- forFileWithAbsolutePath() : FileUnit
- forFunction() : FunctionUnit
- forInterface() : InterfaceUnit
- forInterfaceMethod() : InterfaceMethodUnit
- forTrait() : TraitUnit
- forTraitMethod() : TraitMethodUnit
- isClass() : bool
- isClassMethod() : bool
- isFile() : bool
- isFunction() : bool
- isInterface() : bool
- isInterfaceMethod() : bool
- isTrait() : bool
- isTraitMethod() : bool
- name() : string
- sourceFileName() : string
- sourceLines() : array<string|int, mixed>
- __construct() : mixed
- ensureFileExistsAndIsReadable() : void
- ensureUserDefinedClass() : void
- ensureUserDefinedInterface() : void
- ensureUserDefinedTrait() : void
- reflectorForClass() : ReflectionClass
- reflectorForClassMethod() : ReflectionMethod
- reflectorForFunction() : ReflectionFunction
Properties
$name read-only
private
string
$name
$sourceFileName read-only
private
string
$sourceFileName
$sourceLines read-only
private
array<string|int, mixed>
$sourceLines
Tags
Methods
forClass()
public
static forClass(string $className) : ClassUnit
Parameters
- $className : string
Tags
Return values
ClassUnitforClassMethod()
public
static forClassMethod(string $className, string $methodName) : ClassMethodUnit
Parameters
- $className : string
- $methodName : string
Tags
Return values
ClassMethodUnitforFileWithAbsolutePath()
public
static forFileWithAbsolutePath(string $path) : FileUnit
Parameters
- $path : string
Tags
Return values
FileUnitforFunction()
public
static forFunction(string $functionName) : FunctionUnit
Parameters
- $functionName : string
Tags
Return values
FunctionUnitforInterface()
public
static forInterface(string $interfaceName) : InterfaceUnit
Parameters
- $interfaceName : string
Tags
Return values
InterfaceUnitforInterfaceMethod()
public
static forInterfaceMethod(string $interfaceName, string $methodName) : InterfaceMethodUnit
Parameters
- $interfaceName : string
- $methodName : string
Tags
Return values
InterfaceMethodUnitforTrait()
public
static forTrait(string $traitName) : TraitUnit
Parameters
- $traitName : string
Tags
Return values
TraitUnitforTraitMethod()
public
static forTraitMethod(string $traitName, string $methodName) : TraitMethodUnit
Parameters
- $traitName : string
- $methodName : string
Tags
Return values
TraitMethodUnitisClass()
public
isClass() : bool
Tags
Return values
boolisClassMethod()
public
isClassMethod() : bool
Return values
boolisFile()
public
isFile() : bool
Return values
boolisFunction()
public
isFunction() : bool
Return values
boolisInterface()
public
isInterface() : bool
Return values
boolisInterfaceMethod()
public
isInterfaceMethod() : bool
Return values
boolisTrait()
public
isTrait() : bool
Return values
boolisTraitMethod()
public
isTraitMethod() : bool
Return values
boolname()
public
name() : string
Return values
stringsourceFileName()
public
sourceFileName() : string
Return values
stringsourceLines()
public
sourceLines() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>__construct()
private
__construct(string $name, string $sourceFileName, array<string|int, mixed> $sourceLines) : mixed
Parameters
- $name : string
- $sourceFileName : string
- $sourceLines : array<string|int, mixed>
Tags
ensureFileExistsAndIsReadable()
private
static ensureFileExistsAndIsReadable(string $path) : void
Parameters
- $path : string
Tags
ensureUserDefinedClass()
private
static ensureUserDefinedClass(string $className) : void
Parameters
- $className : string
Tags
ensureUserDefinedInterface()
private
static ensureUserDefinedInterface(string $interfaceName) : void
Parameters
- $interfaceName : string
Tags
ensureUserDefinedTrait()
private
static ensureUserDefinedTrait(string $traitName) : void
Parameters
- $traitName : string
Tags
reflectorForClass()
private
static reflectorForClass(string $className) : ReflectionClass
Parameters
- $className : string
Tags
Return values
ReflectionClassreflectorForClassMethod()
private
static reflectorForClassMethod(string $className, string $methodName) : ReflectionMethod
Parameters
- $className : string
- $methodName : string
Tags
Return values
ReflectionMethodreflectorForFunction()
private
static reflectorForFunction(string $functionName) : ReflectionFunction
Parameters
- $functionName : string