final class ClassType

Class/Interface/Trait description.

Constants

TYPE_CLASS

TYPE_INTERFACE

TYPE_TRAIT

VISIBILITY_PUBLIC

VISIBILITY_PROTECTED

VISIBILITY_PRIVATE

Properties

Method[] $methods
Property[] $properties

Methods

static ClassType
from(string|object $class)

No description

__construct(string $name = null, PhpNamespace $namespace = null)

No description

string
__toString()

No description

PhpNamespace|null
getNamespace() deprecated

No description

setName(string|null $name)

No description

string|null
getName()

No description

setClass()

No description

bool
isClass()

No description

setInterface()

No description

bool
isInterface()

No description

setTrait()

No description

bool
isTrait()

No description

setType(string $type)

No description

string
getType()

No description

setFinal(bool $state = true)

No description

bool
isFinal()

No description

setAbstract(bool $state = true)

No description

bool
isAbstract()

No description

setExtends(string|string[] $names)

No description

string|string[]
getExtends()

No description

addExtend(string $name)

No description

setImplements(array $names)

No description

array
getImplements()

No description

addImplement(string $name)

No description

removeImplement(string $name)

No description

setTraits(array $names)

No description

array
getTraits()

No description

array
getTraitResolutions()

No description

addTrait(string $name, array $resolutions = [])

No description

removeTrait(string $name)

No description

addMember(Method|Property|Constant $member)

No description

setConstants(array $consts)

No description

array
getConstants()

No description

addConstant(string $name, $value)

No description

removeConstant(string $name)

No description

setProperties(array $props)

No description

array
getProperties()

No description

getProperty(string $name)

No description

addProperty(string $name, $value = null)

No description

removeProperty(string $name)

No description

bool
hasProperty(string $name)

No description

setMethods(array $methods)

No description

array
getMethods()

No description

getMethod(string $name)

No description

addMethod(string $name)

No description

removeMethod(string $name)

No description

bool
hasMethod(string $name)

No description

void
validate()

No description

__clone()

No description

Details

at line 73
static ClassType from(string|object $class)

No description

Parameters

string|object $class

Return Value

ClassType

at line 79
__construct(string $name = null, PhpNamespace $namespace = null)

No description

Parameters

string $name
PhpNamespace $namespace

at line 86
string __toString()

No description

Return Value

string

at line 101
PhpNamespace|null getNamespace() deprecated

deprecated an object can be in multiple namespaces

No description

Return Value

PhpNamespace|null

at line 108
ClassType setName(string|null $name)

No description

Parameters

string|null $name

Return Value

ClassType

at line 118
string|null getName()

No description

Return Value

string|null

at line 125
ClassType setClass()

No description

Return Value

ClassType

at line 132
bool isClass()

No description

Return Value

bool

at line 139
ClassType setInterface()

No description

Return Value

ClassType

at line 146
bool isInterface()

No description

Return Value

bool

at line 153
ClassType setTrait()

No description

Return Value

ClassType

at line 160
bool isTrait()

No description

Return Value

bool

at line 167
ClassType setType(string $type)

No description

Parameters

string $type

Return Value

ClassType

at line 177
string getType()

No description

Return Value

string

at line 184
ClassType setFinal(bool $state = true)

No description

Parameters

bool $state

Return Value

ClassType

at line 191
bool isFinal()

No description

Return Value

bool

at line 198
ClassType setAbstract(bool $state = true)

No description

Parameters

bool $state

Return Value

ClassType

at line 205
bool isAbstract()

No description

Return Value

bool

at line 215
ClassType setExtends(string|string[] $names)

No description

Parameters

string|string[] $names

Return Value

ClassType

at line 227
string|string[] getExtends()

No description

Return Value

string|string[]

at line 234
ClassType addExtend(string $name)

No description

Parameters

string $name

Return Value

ClassType

at line 247
ClassType setImplements(array $names)

No description

Parameters

array $names

Return Value

ClassType

at line 256
array getImplements()

No description

Return Value

array

at line 263
ClassType addImplement(string $name)

No description

Parameters

string $name

Return Value

ClassType

at line 272
ClassType removeImplement(string $name)

No description

Parameters

string $name

Return Value

ClassType

at line 286
ClassType setTraits(array $names)

No description

Parameters

array $names

Return Value

ClassType

at line 295
array getTraits()

No description

Return Value

array

at line 302
array getTraitResolutions()

internal  
 

No description

Return Value

array

at line 309
ClassType addTrait(string $name, array $resolutions = [])

No description

Parameters

string $name
array $resolutions

Return Value

ClassType

at line 318
ClassType removeTrait(string $name)

No description

Parameters

string $name

Return Value

ClassType

at line 329
ClassType addMember(Method|Property|Constant $member)

No description

Parameters

Method|Property|Constant $member

Return Value

ClassType

at line 355
ClassType setConstants(array $consts)

No description

Parameters

array $consts

Return Value

ClassType

at line 367
array getConstants()

No description

Return Value

array

at line 373
Constant addConstant(string $name, $value)

No description

Parameters

string $name
$value

Return Value

Constant

at line 380
ClassType removeConstant(string $name)

No description

Parameters

string $name

Return Value

ClassType

at line 391
ClassType setProperties(array $props)

No description

Parameters

array $props

Return Value

ClassType

at line 405
array getProperties()

No description

Return Value

array

at line 411
Property getProperty(string $name)

No description

Parameters

string $name

Return Value

Property

at line 423
Property addProperty(string $name, $value = null)

No description

Parameters

string $name

without $

$value

Return Value

Property

at line 433
ClassType removeProperty(string $name)

No description

Parameters

string $name

without $

Return Value

ClassType

at line 440
bool hasProperty(string $name)

No description

Parameters

string $name

Return Value

bool

at line 450
ClassType setMethods(array $methods)

No description

Parameters

array $methods

Return Value

ClassType

at line 464
array getMethods()

No description

Return Value

array

at line 470
Method getMethod(string $name)

No description

Parameters

string $name

Return Value

Method

at line 479
Method addMethod(string $name)

No description

Parameters

string $name

Return Value

Method

at line 492
ClassType removeMethod(string $name)

No description

Parameters

string $name

Return Value

ClassType

at line 499
bool hasMethod(string $name)

No description

Parameters

string $name

Return Value

bool

at line 506
void validate()

No description

Return Value

void

Exceptions

InvalidStateException

at line 527
__clone()

No description

Traits

SmartObject