ApiReflector
Builds the documentation model from the types the scanner verified.
This is the only place reflection is used: everything downstream works from the ApiIndex, so an emitter can be tested against a model built by hand.
Synopsis
Section titled “Synopsis”final class ApiReflector
| Source | ApiReflector.php |
Constructor
Section titled “Constructor”__construct()
Section titled “__construct()”public function __construct(DocblockParser $docblocks = new DocblockParser(…), TypeResolver $types = new TypeResolver(…), ValueRenderer $values = new ValueRenderer(…), ReferenceResolver $references = new ReferenceResolver(…)): mixed
| Parameter | Type | Description |
|---|---|---|
$docblocks | DocblockParser | |
$types | TypeResolver | |
$values | ValueRenderer | |
$references | ReferenceResolver |
Returns mixed
Methods
Section titled “Methods”| Method | Description |
|---|---|
build(list<ScannedType> $scanned): ApiIndex | |
getDiagnostics(): list<Diagnostic> |
build()
Section titled “build()”public function build(list<ScannedType> $scanned): ApiIndex
| Parameter | Type | Description |
|---|---|---|
$scanned | list``<ScannedType> |
Returns ApiIndex
getDiagnostics()
Section titled “getDiagnostics()”public function getDiagnostics(): list<Diagnostic>
Returns list``<Diagnostic>