class TraitStructure extends Representation

TraitStructure

Traits

Abstraktion von Methoden
Bereitstellung von Funktionalität für Strukturen
Traitfunktionalität für Strukturen bereitstellen.
Eigenschaften

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 ClassComment $comment from Comment
protected ObjectMap $traits from UseTrait
protected Property> $classProperty from Property

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

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
initCommentStructure()

Initialisierung der Strukturen

from Comment
getComment()

Kommentar

from Comment
setComment(ClassComment $comment)

Kommentar setzen

from Comment
initTraitStructure()

Initialisierung der Strukturen

from UseTrait
ObjectMap
getTraits()

Alle Traits holen

from UseTrait
type
setTraits(ObjectMap $traits = null)

Traits setzen

from UseTrait
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
__construct(string $name = '')

Neue Traitstruktur erstellen

Details

in Part at line 75
string|null getName()

Name des Bestandteils

Return Value

string|null Name

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

Name des Bestandteils setzen

Parameters

string $name Name

Return Value

Part

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

Beschreibung setzen

Parameters

string $description Beschreibung

Return Value

Part

in Part at line 108
null getDescription()

Beschreibung

Return Value

null Beschreibung

at line 63
string getToken()

Token

Return Value

string Token

in Representation at line 52
string getNamespace()

Namensraum

Return Value

string Namensraum

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

Namensraum setzen

Parameters

string $namespace Neuer Namensraum

Return Value

Representation Dieses Objekt

in Representation at line 79
string getQualifiedName()

Namespace und Name

Return Value

string Name inklusive Namespace

in Representation at line 102
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 117
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 140
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 159
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 173
static protected ObjectMap getConstantsFromReflection(ReflectionClass $reflection)

Untersuchen der Konstanten

Parameters

ReflectionClass $reflection Objekt

Return Value

ObjectMap Konstante

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

Elternklasse

Parameters

ReflectionClass $reflection Objekt

Return Value

ClassStructure

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

Eigenschaften

Parameters

ReflectionClass $reflection Objekt

Return Value

ObjectMap Eigenschaften

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

Konstruktor

Parameters

ReflectionClass $reflection Objekt

Return Value

Constructor Konstruktor

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

Kommentar

Parameters

ReflectionClass $reflection Objekt

Return Value

ClassComment

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

Destruktor

Parameters

ReflectionClass $reflection Objekt

Return Value

Destructor|null Destruktor

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

Methoden

Parameters

ReflectionClass $reflection Objekt

Return Value

ObjectMap Methoden

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

Traits

Parameters

ReflectionClass $reflection Objekt

Return Value

ObjectMap Traits

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

Interfaces

Parameters

ReflectionClass $reflection Objekt

Return Value

ObjectMap Interfaces

at line 76
static Source getInstanceFromReflection(ReflectionClass $reflection)

Objekt erstellen

Objekt aus einem Reflection-Objekt erstellen.

Parameters

ReflectionClass $reflection

Return Value

Source

in Method at line 57
protected Representation initMethodStrucure()

Initialisierung der Methodenstruktur

Return Value

Representation

in Method at line 68
Method> getMethods()

Methoden

Return Value

Method> Methoden

in Method at line 82
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 94
Method> getMethod(string $name)

Funktion holen

Parameters

string $name Funktionsname

Return Value

Method> Methode

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

Prüfen ob die Methode existiert

Parameters

Method $method

Return Value

boolean

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

Methode setzen

Setzt die Methode mit dem Funktionsnamen.

Parameters

Method $method

Return Value

Representation

in Method at line 129
Constructor getConstructor()

Gibt den gesetzten Konstruktor oder null zurück

Return Value

Constructor

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

Parameters

Constructor $constructor

Return Value

Representation

in Method at line 149
Destructor getDestructor()

Destruktor holen

Return Value

Destructor

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

Destruktor setzen

Parameters

Destructor $destructor

Return Value

Representation

in Comment at line 48
protected Representation initCommentStructure()

Initialisierung der Strukturen

Return Value

Representation

in Comment at line 59
ClassComment getComment()

Kommentar

Return Value

ClassComment

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

Kommentar setzen

Parameters

ClassComment $comment

Return Value

Representation

in UseTrait at line 48
protected Representation initTraitStructure()

Initialisierung der Strukturen

Return Value

Representation

in UseTrait at line 59
ObjectMap getTraits()

Alle Traits holen

Return Value

ObjectMap

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

Traits setzen

Parameters

ObjectMap $traits Traits

Return Value

type

in Property at line 51
protected Representation initPropertyStructure()

Initialisierung der Strukturen

Return Value

Representation

in Property at line 62
Property> getProperties()

Alle Eigenschaften

Return Value

Property>

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

Eigenschaften setzen

Parameters

ObjectMap $property

Return Value

Representation

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

eigenschaft setzen

Parameters

Property $property

Return Value

Representation

in Property at line 98
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

at line 47
__construct(string $name = '')

Neue Traitstruktur erstellen

Parameters

string $name Name des Trait

Exceptions

SourceException