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

setClass() deprecated

No description

bool
isClass()

No description

setInterface() deprecated

No description

bool
isInterface()

No description

setTrait() deprecated

No description

bool
isTrait()

No description

setType(string $type) deprecated

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)

No description

void
validate()

No description

__clone()

No description

Details

at line 46
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 53
static InterfaceType interface(string $name) deprecated

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

No description

Parameters

string $name

Return Value

InterfaceType

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

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

No description

Parameters

string $name

Return Value

TraitType

at line 67
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
ClassType setClass() deprecated

deprecated

No description

Return Value

ClassType

at line 93
bool isClass()

No description

Return Value

bool

at line 100
ClassType setInterface() deprecated

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

No description

Return Value

ClassType

at line 108
bool isInterface()

No description

Return Value

bool

at line 115
ClassType setTrait() deprecated

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

No description

Return Value

ClassType

at line 123
bool isTrait()

No description

Return Value

bool

at line 130
ClassType setType(string $type) deprecated

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

No description

Parameters

string $type

Return Value

ClassType

at line 144
string getType() deprecated

deprecated

No description

Return Value

string

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

No description

Parameters

bool $state

Return Value

ClassType

at line 157
bool isFinal()

No description

Return Value

bool

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

No description

Parameters

bool $state

Return Value

ClassType

at line 170
bool isAbstract()

No description

Return Value

bool

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

No description

Parameters

bool $state

Return Value

ClassType

at line 183
bool isReadOnly()

No description

Return Value

bool

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

No description

Parameters

string|null $name

Return Value

ClassType

at line 199
string|null getExtends()

No description

Return Value

string|null

at line 208
ClassType setImplements(array $names)

No description

Parameters

array $names

Return Value

ClassType

at line 217
array getImplements()

No description

Return Value

array

at line 223
ClassType addImplement(string $name)

No description

Parameters

string $name

Return Value

ClassType

at line 231
ClassType removeImplement(string $name)

No description

Parameters

string $name

Return Value

ClassType

at line 238
ClassType addMember(TraitUse $member)

No description

Parameters

TraitUse $member

Return Value

ClassType

at line 256
void validate()

No description

Return Value

void

Exceptions

InvalidStateException

at line 268
__clone()

No description

Traits