Class_
in package
implements
Element, MetaDataContainer, AttributeContainer
uses
MetadataContainer, HasAttributes
Descriptor representing a Class.
Table of Contents
Interfaces
- Element
- MetaDataContainer
- AttributeContainer
Properties
- $abstract : bool
- $attributes : array<string|int, Attribute>
- $constants : array<string|int, Constant>
- $docBlock : DocBlock|null
- $endLocation : Location
- $final : bool
- $fqsen : Fqsen
- $implements : array<string|int, Fqsen>
- $location : Location
- $methods : array<string|int, Method>
- $parent : Fqsen|null
- $properties : array<string|int, Property>
- $readOnly : bool
- $usedTraits : array<string|int, Fqsen>
Methods
- __construct() : mixed
- Initializes a number of properties with the given values. Others are initialized by definition.
- addAttribute() : void
- addConstant() : void
- Add Constant to this class.
- addInterface() : void
- Add a interface Fqsen this class is implementing.
- addMethod() : void
- Add a method to this class.
- addProperty() : void
- Add a property to this class.
- addUsedTrait() : void
- Add trait fqsen used by this class.
- getAttributes() : array<string|int, Attribute>
- getConstants() : array<string|int, Constant>
- Returns the constants of this class.
- getDocBlock() : DocBlock|null
- getEndLocation() : Location
- getFqsen() : Fqsen
- Returns the Fqsen of the element.
- getInterfaces() : array<string|int, Fqsen>
- Returns the interfaces this class is implementing.
- getLocation() : Location
- getMethods() : array<string|int, Method>
- Returns the methods of this class.
- getName() : string
- Returns the name of the element.
- getParent() : Fqsen|null
- Returns the superclass this class is extending if available.
- getProperties() : array<string|int, Property>
- Returns the properties of this class.
- getUsedTraits() : array<string|int, Fqsen>
- Returns the traits used by this class.
- isAbstract() : bool
- Returns true when this class is abstract. Otherwise returns false.
- isFinal() : bool
- Returns true when this class is final. Otherwise returns false.
- isReadOnly() : bool
- Returns true when this class is read-only. Otherwise returns false.
Properties
$abstract read-only
private
bool
$abstract
= false
Whether this is an abstract class.
$attributes
private
array<string|int, Attribute>
$attributes
= []
$constants
private
array<string|int, Constant>
$constants
= []
References to constants defined in this class.
$docBlock read-only
private
DocBlock|null
$docBlock
= null
$endLocation read-only
private
Location
$endLocation
$final read-only
private
bool
$final
= false
Whether this class is marked as final and can't be subclassed.
$fqsen read-only
private
Fqsen
$fqsen
Full Qualified Structural Element Name
$implements
private
array<string|int, Fqsen>
$implements
= []
References to interfaces that are implemented by this class.
$location read-only
private
Location
$location
$methods
private
array<string|int, Method>
$methods
= []
References to methods defined in this class.
$parent read-only
private
Fqsen|null
$parent
= null
The class this class is extending.
$properties
private
array<string|int, Property>
$properties
= []
References to properties defined in this class.
$readOnly read-only
private
bool
$readOnly
= false
$usedTraits
private
array<string|int, Fqsen>
$usedTraits
= []
References to traits consumed by this class
Methods
__construct()
Initializes a number of properties with the given values. Others are initialized by definition.
public
__construct(Fqsen $fqsen[, DocBlock|null $docBlock = null ][, Fqsen|null $parent = null ][, bool $abstract = false ][, bool $final = false ][, Location|null $location = null ][, Location|null $endLocation = null ][, bool $readOnly = false ]) : mixed
Parameters
- $fqsen : Fqsen
- $docBlock : DocBlock|null = null
- $parent : Fqsen|null = null
- $abstract : bool = false
- $final : bool = false
- $location : Location|null = null
- $endLocation : Location|null = null
- $readOnly : bool = false
addAttribute()
public
addAttribute(Attribute $attribute) : void
Parameters
- $attribute : Attribute
addConstant()
Add Constant to this class.
public
addConstant(Constant $constant) : void
Parameters
- $constant : Constant
addInterface()
Add a interface Fqsen this class is implementing.
public
addInterface(Fqsen $interface) : void
Parameters
- $interface : Fqsen
addMethod()
Add a method to this class.
public
addMethod(Method $method) : void
Parameters
- $method : Method
addProperty()
Add a property to this class.
public
addProperty(Property $property) : void
Parameters
- $property : Property
addUsedTrait()
Add trait fqsen used by this class.
public
addUsedTrait(Fqsen $fqsen) : void
Parameters
- $fqsen : Fqsen
getAttributes()
public
getAttributes() : array<string|int, Attribute>
Return values
array<string|int, Attribute>getConstants()
Returns the constants of this class.
public
getConstants() : array<string|int, Constant>
Return values
array<string|int, Constant>getDocBlock()
public
getDocBlock() : DocBlock|null
Return values
DocBlock|nullgetEndLocation()
public
getEndLocation() : Location
Return values
LocationgetFqsen()
Returns the Fqsen of the element.
public
getFqsen() : Fqsen
Attributes
- #[Override]
Return values
FqsengetInterfaces()
Returns the interfaces this class is implementing.
public
getInterfaces() : array<string|int, Fqsen>
Return values
array<string|int, Fqsen>getLocation()
public
getLocation() : Location
Return values
LocationgetMethods()
Returns the methods of this class.
public
getMethods() : array<string|int, Method>
Return values
array<string|int, Method>getName()
Returns the name of the element.
public
getName() : string
Attributes
- #[Override]
Return values
stringgetParent()
Returns the superclass this class is extending if available.
public
getParent() : Fqsen|null
Return values
Fqsen|nullgetProperties()
Returns the properties of this class.
public
getProperties() : array<string|int, Property>
Return values
array<string|int, Property>getUsedTraits()
Returns the traits used by this class.
public
getUsedTraits() : array<string|int, Fqsen>
Return values
array<string|int, Fqsen>isAbstract()
Returns true when this class is abstract. Otherwise returns false.
public
isAbstract() : bool
Return values
boolisFinal()
Returns true when this class is final. Otherwise returns false.
public
isFinal() : bool
Return values
boolisReadOnly()
Returns true when this class is read-only. Otherwise returns false.
public
isReadOnly() : bool