final class ClassType extends ClassLike

Definition of a class with properties, methods, constants, traits and PHP attributes.

Constants

deprecated TYPE_CLASS

deprecated TYPE_INTERFACE

deprecated TYPE_TRAIT

deprecated TYPE_ENUM

Methods

static ClassType
class(string|null $name) deprecated

No description

static InterfaceType
interface(string $name) deprecated

No description

static TraitType
trait(string $name) deprecated

No description

static EnumType
enum(string $name) deprecated

No description

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

No description

string
getType() deprecated

No description

setFinal(bool $state = true)

No description

bool
isFinal()

No description

setAbstract(bool $state = true)

No description

bool
isAbstract()

No description

setReadOnly(bool $state = true)

No description

bool
isReadOnly()

No description

setExtends(string|null $name)

No description

string|null
getExtends()

No description

setImplements(array $names)

No description

array
getImplements()

No description

addImplement(string $name)

No description

removeImplement(string $name)

No description

addMember(TraitUse $member, bool $overwrite = false)

No description

inheritProperty(string $name, bool $returnIfExists = false) deprecated

No description

inheritMethod(string $name, bool $returnIfExists = false) deprecated

No description

void
validate()

No description

void
__clone()

No description

Details

at line 42
static ClassType class(string|null $name) deprecated

deprecated create object using 'new Nette\PhpGenerator\ClassType'

No description

Parameters

string|null $name

Return Value

ClassType

at line 50
static InterfaceType interface(string $name) deprecated

deprecated create object using 'new Nette\PhpGenerator\InterfaceType'

No description

Parameters

string $name

Return Value

InterfaceType

at line 58
static TraitType trait(string $name) deprecated

deprecated create object using 'new Nette\PhpGenerator\TraitType'

No description

Parameters

string $name

Return Value

TraitType

at line 66
static EnumType enum(string $name) deprecated

deprecated create object using 'new Nette\PhpGenerator\EnumType'

No description

Parameters

string $name

Return Value

EnumType

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

No description

Parameters

string $name
PhpNamespace|null $namespace

at line 85
string getType() deprecated

deprecated

No description

Return Value

string

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

No description

Parameters

bool $state

Return Value

ClassType

at line 99
bool isFinal()

No description

Return Value

bool

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

No description

Parameters

bool $state

Return Value

ClassType

at line 112
bool isAbstract()

No description

Return Value

bool

at line 118
ClassType setReadOnly(bool $state = true)

No description

Parameters

bool $state

Return Value

ClassType

at line 125
bool isReadOnly()

No description

Return Value

bool

at line 131
ClassType setExtends(string|null $name)

No description

Parameters

string|null $name

Return Value

ClassType

at line 141
string|null getExtends()

No description

Return Value

string|null

at line 150
ClassType setImplements(array $names)

No description

Parameters

array $names

Return Value

ClassType

at line 159
array getImplements()

No description

Return Value

array

at line 165
ClassType addImplement(string $name)

No description

Parameters

string $name

Return Value

ClassType

at line 173
ClassType removeImplement(string $name)

No description

Parameters

string $name

Return Value

ClassType

at line 180
ClassType addMember(TraitUse $member, bool $overwrite = false)

No description

Parameters

TraitUse $member
bool $overwrite

Return Value

ClassType

at line 200
Property inheritProperty(string $name, bool $returnIfExists = false) deprecated

deprecated use ClassManipulator::inheritProperty()

No description

Parameters

string $name
bool $returnIfExists

Return Value

Property

at line 209
Method inheritMethod(string $name, bool $returnIfExists = false) deprecated

deprecated use ClassManipulator::inheritMethod()

No description

Parameters

string $name
bool $returnIfExists

Return Value

Method

at line 216
void validate()

No description

Return Value

void

Exceptions

InvalidStateException

at line 228
void __clone()

No description

Return Value

void

Traits