ClassDoc
Everything one page needs about one class, interface, trait or enum.
Synopsis
Section titled “Synopsis”final class ClassDoc
| Source | Ir/ClassDoc.php |
Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
$abstract | bool | readonly. |
$backingType | ?``string | readonly. |
$cases | array | readonly. |
$constants | array | readonly. |
$constructor | ?MethodDoc | readonly. |
$doc | DocBlock | readonly. |
$final | bool | readonly. |
$fqcn | string | readonly. |
$implementedBy | array | readonly. |
$inheritedMethods | array | readonly. |
$interfaces | array | readonly. |
$kind | string | readonly. |
$methods | array | readonly. |
$namespace | string | readonly. |
$parent | ?TypeRef | readonly. |
$properties | array | readonly. |
$readonly | bool | readonly. |
$shortName | string | readonly. |
$sourcePath | string | readonly. |
$traits | array | readonly. |
Constructor
Section titled “Constructor”__construct()
Section titled “__construct()”public function __construct(string $fqcn, string $shortName, string $namespace, 'class'|'interface'|'trait'|'enum' $kind, DocBlock $doc, string $sourcePath, bool $abstract = false, bool $final = false, bool $readonly = false, ?TypeRef $parent = null, list<TypeRef> $interfaces = [], list<TypeRef> $traits = [], list<ConstantDoc> $constants = [], list<EnumCaseDoc> $cases = [], list<PropertyDoc> $properties = [], ?MethodDoc $constructor = null, list<MethodDoc> $methods = [], list<InheritedMember> $inheritedMethods = [], list<string> $implementedBy = [], ?string $backingType = null): mixed
Fully-qualified names, filled in once every class is known.
| Parameter | Type | Description |
|---|---|---|
$fqcn | string | |
$shortName | string | |
$namespace | string | |
$kind | `‘class’“ | 'interface' |
$doc | DocBlock | |
$sourcePath | string | |
$abstract | bool | |
$final | bool | |
$readonly | bool | |
$parent | ?TypeRef | |
$interfaces | list``<TypeRef> | |
$traits | list``<TypeRef> | |
$constants | list``<ConstantDoc> | |
$cases | list``<EnumCaseDoc> | |
$properties | list``<PropertyDoc> | |
$constructor | ?MethodDoc | |
$methods | list``<MethodDoc> | Declared here, trait-composed included. |
$inheritedMethods | list``<InheritedMember> | |
$implementedBy | list``<``string``> | Fully-qualified names, filled in once every class is known. |
$backingType | ?``string |
Returns mixed
Methods
Section titled “Methods”| Method | Description |
|---|---|
declaration(): string | The declaration line, as it would be written in source. |
namespaceSegments(): list<string> | |
withImplementedBy(list<string> $implementedBy): ClassDoc |
declaration()
Section titled “declaration()”public function declaration(): string
The declaration line, as it would be written in source.
Returns string
namespaceSegments()
Section titled “namespaceSegments()”public function namespaceSegments(): list<string>
Returns list``<``string``> — The namespace split into segments below the framework root.
withImplementedBy()
Section titled “withImplementedBy()”public function withImplementedBy(list<string> $implementedBy): ClassDoc
| Parameter | Type | Description |
|---|---|---|
$implementedBy | list``<``string``> |
Returns ClassDoc