class ClassStructure extends Representation

Diese Klasse bildet die Struktur einer Klasse ab und dient als Sammelpunkt für alle Informationen einer Klasse.

Traits

Abstraktion von Methoden
Bereitstellung von Funktionalität für Strukturen
Eigenschaften
FinalTrait
Traitfunktionalität für Strukturen bereitstellen.
Implementiert die Funktionalität zur Speicherung der Abstraktfunktionalität.
Implementierung von Interfaces
Bereitstellung der Funktionalität für Erweiterungen
Bereitstellung von Funktionalität für Strukturen

Constants

VISIBILITY_PROTECTED

geschützt

VISIBILITY_PRIVATE

private

VISIBILITY_PUBLIC

öffentlich

Properties

protected string $name from Part
protected string $description from Part
protected string $namespace from Representation
protected Method> $method from Method
protected Constructor $constructor from Method
protected Destructor $destructor from Method
protected Constant> $constant from Constant
protected Property> $classProperty from Property
protected boolean $final from FinalTrait
protected ObjectMap $traits from UseTrait
protected boolean $abstract from AbstractTrait
protected boolean $interfaces from Implementation
protected ClassStructure $parent from Extend
protected ClassComment $comment from Comment

Methods

string|null
getName()

Name des Bestandteils

from Part
setName(string $name)

Name des Bestandteils setzen

from Part
setDescription(string $description)

Beschreibung setzen

from Part
null
getDescription()

Beschreibung

from Part
string
getToken()

Token der Klasse

string
getNamespace()

Namensraum

setNamespace(string $namespace)

Namensraum setzen

string
getQualifiedName()

Namespace und Name

static boolean
isParentClassConstant(ReflectionClass $reflection, string $key, string $value)

Prüfen ob Konstante in Elternklasse definiert ist

static boolean
isInterfaceClassConstant(type $interfaces, type $key, type $value)

Ist die Konstante Teil eines Interfaces

static boolean
isParentClassInterface(ReflectionClass $reflection, string $name)

Prüfen ob Methode in Elternklasse implementiert ist

static boolean
isParentClassTrait(ReflectionClass $reflection, string $name)

Prüfung

static ObjectMap
getConstantsFromReflection(ReflectionClass $reflection)

Untersuchen der Konstanten

static ClassStructure
getParentFromReflection(ReflectionClass $reflection)

Elternklasse

static ObjectMap
getPropertiesFromReflection(ReflectionClass $reflection)

Eigenschaften

static Destructor|null
static ObjectMap
static ObjectMap
getTraitsReflection(ReflectionClass $reflection)

Traits

static ObjectMap
static Source
getInstanceFromReflection(ReflectionClass $reflection)

Objekt erstellen

initMethodStrucure()

Initialisierung der Methodenstruktur

from Method
Method>
getMethods()

Methoden

from Method
setMethods(ObjectMap $methods)

Methoden setzen

from Method
Method>
getMethod(string $name)

Funktion holen

from Method
boolean
methodExists(Method $method)

Prüfen ob die Methode existiert

from Method
setMethod(Method $method)

Methode setzen

from Method
Constructor
getConstructor()

Gibt den gesetzten Konstruktor oder null zurück

from Method
setConstructor(Constructor $constructor = null)

No description

from Method
getDestructor()

Destruktor holen

from Method
setDestructor(Destructor $destructor = null)

Destruktor setzen

from Method
initConstantStructure()

Initialisierung der Strukturen

from Constant
ObjectMap
getConstants()

Alle Konstante

from Constant
setConstants(ObjectMap $constant)

Konstante setzen

from Constant
initPropertyStructure()

Initialisierung der Strukturen

from Property
Property>
getProperties()

Alle Eigenschaften

from Property
setProperties(ObjectMap $property)

Eigenschaften setzen

from Property
setProperty(Property $property)

eigenschaft setzen

from Property
boolean
propertyExists(Property $property)

Prüfen ob die Eigenschaft in der Struktur vorliegt

from Property
boolean
isFinal()

Ist die Struktur final?

setFinal(boolean $mode)

Final

initTraitStructure()

Initialisierung der Strukturen

from UseTrait
ObjectMap
getTraits()

Alle Traits holen

from UseTrait
type
setTraits(ObjectMap $traits = null)

Traits setzen

from UseTrait
boolean
isAbstract()

Ist die Struktur abstrakt?

setAbstract(boolean $mode)

Abstraktion

initImplementationStructure()

Initialisierung der Strukturen

InterfaceStructure>
getInterfaces()

Interfaces

setInterfaces(ObjectMap $interfaces = null)

Interfaces setzen

initExtendStructure()

Initialisierung der Strukturen

from Extend
Representation|null
getParent()

Eltern

from Extend
setParent(ClassStructure $parent = null)

Eltern

from Extend
initCommentStructure()

Initialisierung der Strukturen

from Comment
getComment()

Kommentar

from Comment
setComment(ClassComment $comment)

Kommentar setzen

from Comment
__construct(string $name)

Neue Klasse erstellen

Details

in Part at line 73
string|null getName()

Name des Bestandteils

Return Value

string|null Name

in Part at line 84
Part setName(string $name)

Name des Bestandteils setzen

Parameters

string $name Name

Return Value

Part

in Part at line 96
Part setDescription(string $description)

Beschreibung setzen

Parameters

string $description Beschreibung

Return Value

Part

in Part at line 106
null getDescription()

Beschreibung

Return Value

null Beschreibung

at line 115
string getToken()

Token der Klasse

Return Value

string Token

in Representation at line 50
string getNamespace()

Namensraum

Return Value

string Namensraum

in Representation at line 61
Representation setNamespace(string $namespace)

Namensraum setzen

Parameters

string $namespace Neuer Namensraum

Return Value

Representation Dieses Objekt

in Representation at line 77
string getQualifiedName()

Namespace und Name

Return Value

string Name inklusive Namespace

in Representation at line 100
static protected boolean isParentClassConstant(ReflectionClass $reflection, string $key, string $value)

Prüfen ob Konstante in Elternklasse definiert ist

Die Methode prüft, ob eine Konstante bereits in einer Elternklasse mit dem gleichen Wert definiert wurde. Dadurch kann man erkennen, ob die Konstante nochmal definiert werden muss.

Parameters

ReflectionClass $reflection Reflektion
string $key Schlüssel
string $value Wert

Return Value

boolean Ergebnis

in Representation at line 115
static protected boolean isInterfaceClassConstant(type $interfaces, type $key, type $value)

Ist die Konstante Teil eines Interfaces

Parameters

type $interfaces
type $key
type $value

Return Value

boolean

in Representation at line 138
static protected boolean isParentClassInterface(ReflectionClass $reflection, string $name)

Prüfen ob Methode in Elternklasse implementiert ist

Diese Methode prüft, ob das Interface in einer Elternklasse implementiert wurde oder aber, ob das Interface in der aktuellen Klasse implementiert wurde.

Parameters

ReflectionClass $reflection Objekt
string $name Name

Return Value

boolean Ergebnis

in Representation at line 157
static protected boolean isParentClassTrait(ReflectionClass $reflection, string $name)

Prüfung

Diese Methode prüft, ob das Trait in einer Elternklasse implementiert wurde oder aber, ob das Trait in der aktuellen Klasse implementiert wurde.

Parameters

ReflectionClass $reflection Objekt
string $name Name

Return Value

boolean Ergebnis

in Representation at line 171
static protected ObjectMap getConstantsFromReflection(ReflectionClass $reflection)

Untersuchen der Konstanten

Parameters

ReflectionClass $reflection Objekt

Return Value

ObjectMap Konstante

in Representation at line 195
static protected ClassStructure getParentFromReflection(ReflectionClass $reflection)

Elternklasse

Parameters

ReflectionClass $reflection Objekt

Return Value

ClassStructure

in Representation at line 207
static protected ObjectMap getPropertiesFromReflection(ReflectionClass $reflection)

Eigenschaften

Parameters

ReflectionClass $reflection Objekt

Return Value

ObjectMap Eigenschaften

in Representation at line 225
static protected Constructor getConstructorFromReflection(ReflectionClass $reflection)

Konstruktor

Parameters

ReflectionClass $reflection Objekt

Return Value

Constructor Konstruktor

in Representation at line 239
static protected ClassComment getCommentFromReflection(ReflectionClass $reflection)

Kommentar

Parameters

ReflectionClass $reflection Objekt

Return Value

ClassComment

in Representation at line 250
static protected Destructor|null getDestructorFromReflection(ReflectionClass $reflection)

Destruktor

Parameters

ReflectionClass $reflection Objekt

Return Value

Destructor|null Destruktor

in Representation at line 267
static protected ObjectMap getMethodsFromReflection(ReflectionClass $reflection)

Methoden

Parameters

ReflectionClass $reflection Objekt

Return Value

ObjectMap Methoden

in Representation at line 325
static protected ObjectMap getTraitsReflection(ReflectionClass $reflection)

Traits

Parameters

ReflectionClass $reflection Objekt

Return Value

ObjectMap Traits

in Representation at line 398
static protected ObjectMap getInterfacesFromReflection(ReflectionClass $reflection)

Interfaces

Parameters

ReflectionClass $reflection Objekt

Return Value

ObjectMap Interfaces

at line 86
static Source getInstanceFromReflection(ReflectionClass $reflection)

Objekt erstellen

Objekt aus einem Reflection-Objekt erstellen.

Parameters

ReflectionClass $reflection

Return Value

Source

in Method at line 56
protected Representation initMethodStrucure()

Initialisierung der Methodenstruktur

Return Value

Representation

in Method at line 67
Method> getMethods()

Methoden

Return Value

Method> Methoden

in Method at line 81
Representation setMethods(ObjectMap $methods)

Methoden setzen

Alle Methoden werden gelöscht und die übergebene Collection gesetzt.

Parameters

ObjectMap $methods

Return Value

Representation

in Method at line 93
Method> getMethod(string $name)

Funktion holen

Parameters

string $name Funktionsname

Return Value

Method> Methode

in Method at line 104
boolean methodExists(Method $method)

Prüfen ob die Methode existiert

Parameters

Method $method

Return Value

boolean

in Method at line 118
Representation setMethod(Method $method)

Methode setzen

Setzt die Methode mit dem Funktionsnamen.

Parameters

Method $method

Return Value

Representation

in Method at line 128
Constructor getConstructor()

Gibt den gesetzten Konstruktor oder null zurück

Return Value

Constructor

in Method at line 138
Representation setConstructor(Constructor $constructor = null)

Parameters

Constructor $constructor

Return Value

Representation

in Method at line 148
Destructor getDestructor()

Destruktor holen

Return Value

Destructor

in Method at line 159
Representation setDestructor(Destructor $destructor = null)

Destruktor setzen

Parameters

Destructor $destructor

Return Value

Representation

in Constant at line 46
protected Representation initConstantStructure()

Initialisierung der Strukturen

Return Value

Representation

in Constant at line 57
ObjectMap getConstants()

Alle Konstante

Return Value

ObjectMap Konstante

in Constant at line 68
Representation setConstants(ObjectMap $constant)

Konstante setzen

Parameters

ObjectMap $constant Konstante

Return Value

Representation

in Property at line 49
protected Representation initPropertyStructure()

Initialisierung der Strukturen

Return Value

Representation

in Property at line 60
Property> getProperties()

Alle Eigenschaften

Return Value

Property>

in Property at line 71
Representation setProperties(ObjectMap $property)

Eigenschaften setzen

Parameters

ObjectMap $property

Return Value

Representation

in Property at line 84
Representation setProperty(Property $property)

eigenschaft setzen

Parameters

Property $property

Return Value

Representation

in Property at line 96
boolean propertyExists(Property $property)

Prüfen ob die Eigenschaft in der Struktur vorliegt

Parameters

Property $property Eigenschaft

Return Value

boolean true wenn die Eigenschaft existiert

in FinalTrait at line 46
boolean isFinal()

Ist die Struktur final?

Return Value

boolean

in FinalTrait at line 57
Representation setFinal(boolean $mode)

Final

Parameters

boolean $mode Final

Return Value

Representation

in UseTrait at line 46
protected Representation initTraitStructure()

Initialisierung der Strukturen

Return Value

Representation

in UseTrait at line 57
ObjectMap getTraits()

Alle Traits holen

Return Value

ObjectMap

in UseTrait at line 68
type setTraits(ObjectMap $traits = null)

Traits setzen

Parameters

ObjectMap $traits Traits

Return Value

type

in AbstractTrait at line 47
boolean isAbstract()

Ist die Struktur abstrakt?

Return Value

boolean

in AbstractTrait at line 61
Representation setAbstract(boolean $mode)

Abstraktion

Setzt den Schalter ob die Struktur abstrakt ist oder nicht.

Parameters

boolean $mode Abstraktion

Return Value

Representation

in Implementation at line 46
protected Representation initImplementationStructure()

Initialisierung der Strukturen

Return Value

Representation

in Implementation at line 57
InterfaceStructure> getInterfaces()

Interfaces

Return Value

InterfaceStructure>

in Implementation at line 68
Representation setInterfaces(ObjectMap $interfaces = null)

Interfaces setzen

Parameters

ObjectMap $interfaces \Alvine\Types\Map\ObjectMap<\Alvine\Development\Upkeep\Representation\InterfaceStructure>

Return Value

Representation

in Extend at line 46
protected Representation initExtendStructure()

Initialisierung der Strukturen

Return Value

Representation

in Extend at line 56
Representation|null getParent()

Eltern

Return Value

Representation|null

in Extend at line 67
Representation setParent(ClassStructure $parent = null)

Eltern

Parameters

ClassStructure $parent

Return Value

Representation

in Comment at line 46
protected Representation initCommentStructure()

Initialisierung der Strukturen

Return Value

Representation

in Comment at line 57
ClassComment getComment()

Kommentar

Return Value

ClassComment

in Comment at line 68
Representation setComment(ClassComment $comment)

Kommentar setzen

Parameters

ClassComment $comment

Return Value

Representation

at line 52
__construct(string $name)

Neue Klasse erstellen

Parameters

string $name Name der Klasse

Exceptions

SourceException