PropertyDescriptor
extends DescriptorAbstract
in package
implements
PropertyInterface, VisibilityInterface
Descriptor representing a property.
Interfaces, Classes and Traits
- PropertyInterface
- Descriptor representing a property on a class or trait.
- VisibilityInterface
Table of Contents
- $default : string
- $description : DescriptionDescriptor|null
- $errors : Collection<string|int, Error>
- $fileDescriptor : FileDescriptor|null
- $fqsen : Fqsen
- $inheritedElement : DescriptorAbstract|null
- $line : int
- $name : string
- $namespace : NamespaceDescriptor|string
- $package : PackageDescriptor|string
- $parent : ClassDescriptor|TraitDescriptor|null
- $static : bool
- $summary : string
- $tags : Collection<string|int, Collection<string|int, TagDescriptor>>
- $type : Type|null
- $visibility : string
- $readOnly : bool
- $writeOnly : bool
- __call() : Collection<string|int, TagDescriptor>|null
- Dynamically constructs a set of getters to retrieve tag (collections) with.
- __construct() : mixed
- Initializes this descriptor.
- __toString() : string
- Represents this object by its unique identifier, the Fully Qualified Structural Element Name.
- getAuthor() : Collection<string|int, AuthorDescriptor>
- getCopyright() : Collection<string|int, TagDescriptor>
- Returns the copyrights for this element.
- getDefault() : string|null
- Returns the textual representation of the default value for a property, or null if none is provided.
- getDescription() : DescriptionDescriptor|null
- Returns the description for this element.
- getErrors() : Collection<string|int, Error>
- Returns all errors that occur in this element.
- getFile() : FileDescriptor
- Returns the file associated with the parent class or trait.
- getFullyQualifiedStructuralElementName() : Fqsen|null
- Returns the Fully Qualified Structural Element Name (FQSEN) for this element.
- getInheritedElement() : DescriptorAbstract|string|Fqsen|null
- Returns the property from which this one should inherit, if any.
- getLine() : int
- Returns the line number where the definition for this element can be found.
- getName() : string
- Returns the local name for this element.
- getNamespace() : NamespaceDescriptor|string
- Returns the namespace for this element (defaults to global "\")
- getPackage() : PackageDescriptor|null
- Returns the package name for this element.
- getParent() : ClassDescriptor|TraitDescriptor|null
- getPath() : string
- Returns the path to the file containing this element relative to the project's root.
- getSummary() : string
- Returns the summary which describes this element.
- getTags() : Collection<string|int, Collection<string|int, TagDescriptor>>
- Returns the tags associated with this element.
- getType() : Type|null
- Returns the types associated with the value(s) for this property.
- getTypes() : array<int, string>
- getVar() : Collection<string|int, VarDescriptor>
- getVersion() : Collection<string|int, VersionDescriptor>
- Returns the versions for this element.
- getVisibility() : string
- Returns the visibility for this element.
- isDeprecated() : bool
- Checks whether this element is deprecated.
- isReadOnly() : bool
- Returns true when this property is intended to be read-only.
- isStatic() : bool
- Returns whether this property is static in scope.
- isWriteOnly() : bool
- Returns true when this property is intended to be write-only.
- setDefault() : void
- Stores a textual representation of the default value for a property.
- setParent() : void
- setReadOnly() : void
- setStatic() : void
- Sets whether this property is static in scope.
- setType() : void
- Sets the types associated with the value(s) for this property.
- setVisibility() : void
- Sets whether this property is available from inside or outside its class and/or descendants.
- setWriteOnly() : void
Properties
$default
protected
string
$default
$description
protected
DescriptionDescriptor|null
$description
A more extensive description of this element.
$errors
protected
Collection<string|int, Error>
$errors
A list of errors found while building this element.
$fileDescriptor
protected
FileDescriptor|null
$fileDescriptor
The file to which this element belongs; if applicable
$fqsen
protected
Fqsen
$fqsen
Fully Qualified Structural Element Name; the FQCN including method, property or constant name
$inheritedElement
protected
DescriptorAbstract|null
$inheritedElement
= null
the element from which to inherit information in this element
$line
protected
int
$line
= 0
The line number on which this element occurs.
$name
protected
string
$name
= ''
The local name for this element
$namespace
protected
NamespaceDescriptor|string
$namespace
= ''
The namespace for this element
$package
protected
PackageDescriptor|string
$package
The package with which this element is associated
$parent
protected
ClassDescriptor|TraitDescriptor|null
$parent
$static
protected
bool
$static
= false
$summary
protected
string
$summary
= ''
A summary describing the function of this element in short.
$tags
protected
Collection<string|int, Collection<string|int, TagDescriptor>>
$tags
The tags associated with this element.
$type
protected
Type|null
$type
$visibility
protected
string
$visibility
= 'public'
$readOnly
private
bool
$readOnly
= false
$writeOnly
private
bool
$writeOnly
= false
Methods
__call()
Dynamically constructs a set of getters to retrieve tag (collections) with.
public
__call(string $name, array<string|int, mixed> $arguments) : Collection<string|int, TagDescriptor>|null
Important: __call() is not a fast method of access; it is preferred to directly use the getTags() collection. This interface is provided to allow for uniform and easy access to certain tags.
Parameters
- $name : string
- $arguments : array<string|int, mixed>
Return values
Collection<string|int, TagDescriptor>|null —__construct()
Initializes this descriptor.
public
__construct() : mixed
Return values
mixed —__toString()
Represents this object by its unique identifier, the Fully Qualified Structural Element Name.
public
__toString() : string
Return values
string —getAuthor()
public
getAuthor() : Collection<string|int, AuthorDescriptor>
Return values
Collection<string|int, AuthorDescriptor> —getCopyright()
Returns the copyrights for this element.
public
getCopyright() : Collection<string|int, TagDescriptor>
Return values
Collection<string|int, TagDescriptor> —getDefault()
Returns the textual representation of the default value for a property, or null if none is provided.
public
getDefault() : string|null
Return values
string|null —getDescription()
Returns the description for this element.
public
getDescription() : DescriptionDescriptor|null
This method will automatically attempt to inherit the parent's description if this one has none.
Return values
DescriptionDescriptor|null —getErrors()
Returns all errors that occur in this element.
public
getErrors() : Collection<string|int, Error>
Return values
Collection<string|int, Error> —getFile()
Returns the file associated with the parent class or trait.
public
getFile() : FileDescriptor
Return values
FileDescriptor —getFullyQualifiedStructuralElementName()
Returns the Fully Qualified Structural Element Name (FQSEN) for this element.
public
getFullyQualifiedStructuralElementName() : Fqsen|null
Return values
Fqsen|null —getInheritedElement()
Returns the property from which this one should inherit, if any.
public
getInheritedElement() : DescriptorAbstract|string|Fqsen|null
Return values
DescriptorAbstract|string|Fqsen|null —getLine()
Returns the line number where the definition for this element can be found.
public
getLine() : int
Return values
int —getName()
Returns the local name for this element.
public
getName() : string
Return values
string —getNamespace()
Returns the namespace for this element (defaults to global "\")
public
getNamespace() : NamespaceDescriptor|string
Return values
NamespaceDescriptor|string —getPackage()
Returns the package name for this element.
public
getPackage() : PackageDescriptor|null
Return values
PackageDescriptor|null —getParent()
public
getParent() : ClassDescriptor|TraitDescriptor|null
Return values
ClassDescriptor|TraitDescriptor|null —getPath()
Returns the path to the file containing this element relative to the project's root.
public
getPath() : string
Return values
string —getSummary()
Returns the summary which describes this element.
public
getSummary() : string
This method will automatically attempt to inherit the parent's summary if this one has none.
Return values
string —getTags()
Returns the tags associated with this element.
public
getTags() : Collection<string|int, Collection<string|int, TagDescriptor>>
Return values
Collection<string|int, Collection<string|int, TagDescriptor>> —getType()
Returns the types associated with the value(s) for this property.
public
getType() : Type|null
Return values
Type|null —getTypes()
public
getTypes() : array<int, string>
Return values
array<int, string> —getVar()
public
getVar() : Collection<string|int, VarDescriptor>
Return values
Collection<string|int, VarDescriptor> —getVersion()
Returns the versions for this element.
public
getVersion() : Collection<string|int, VersionDescriptor>
Return values
Collection<string|int, VersionDescriptor> —getVisibility()
Returns the visibility for this element.
public
getVisibility() : string
The following values are supported:
- public
- protected
- private
Return values
string —isDeprecated()
Checks whether this element is deprecated.
public
isDeprecated() : bool
Return values
bool —isReadOnly()
Returns true when this property is intended to be read-only.
public
isReadOnly() : bool
Return values
bool —isStatic()
Returns whether this property is static in scope.
public
isStatic() : bool
Return values
bool —isWriteOnly()
Returns true when this property is intended to be write-only.
public
isWriteOnly() : bool
Return values
bool —setDefault()
Stores a textual representation of the default value for a property.
public
setDefault(string|null $default) : void
Parameters
- $default : string|null
Return values
void —setParent()
public
setParent(ClassDescriptor|TraitDescriptor $parent) : void
Parameters
- $parent : ClassDescriptor|TraitDescriptor
Return values
void —setReadOnly()
public
setReadOnly(bool $value) : void
Parameters
- $value : bool
Return values
void —setStatic()
Sets whether this property is static in scope.
public
setStatic(bool $static) : void
Parameters
- $static : bool
Return values
void —setType()
Sets the types associated with the value(s) for this property.
public
setType(Type|null $type) : void
Parameters
- $type : Type|null
Return values
void —setVisibility()
Sets whether this property is available from inside or outside its class and/or descendants.
public
setVisibility(string $visibility) : void
Parameters
- $visibility : string
-
May be either 'public', 'private' or 'protected'.
Return values
void —setWriteOnly()
public
setWriteOnly(bool $value) : void
Parameters
- $value : bool