ApiIndex
Every documented class, plus the lookups the emitters need across them.
Cross-linking and the “implemented by” back-index both need to see the whole corpus, so they are resolved once here rather than rediscovered per page.
Synopsis
Section titled “Synopsis”final class ApiIndex
| Source | Ir/ApiIndex.php |
Constructor
Section titled “Constructor”__construct()
Section titled “__construct()”public function __construct(list<ClassDoc> $classes, Slugger $slugger = new Slugger(…)): mixed
| Parameter | Type | Description |
|---|---|---|
$classes | list``<ClassDoc> | |
$slugger | Slugger |
Returns mixed
Methods
Section titled “Methods”| Method | Description |
|---|---|
classes(): list<ClassDoc> | |
get(string $fqcn): ?ClassDoc | |
has(string $fqcn): bool | |
inNamespace(string $namespace): list<ClassDoc> | |
namespaces(): list<string> | |
navigableNamespaces(): list<string> | Every namespace that needs a page, including the ones holding nothing but other namespaces. |
slugFor(string $fqcn): ?string | The page path for a documented class, or null when it is not part of the reference. |
slugger(): Slugger | |
topLevelNamespaces(): list<string> | The namespaces the reference lists in its navigation: one level below the framework root, which is the granularity a sidebar can carry without putting every class on every page. |
under(string $namespace): list<ClassDoc> |
classes()
Section titled “classes()”public function classes(): list<ClassDoc>
Returns list``<ClassDoc> — Ordered by fully-qualified name.
public function get(string $fqcn): ?ClassDoc
| Parameter | Type | Description |
|---|---|---|
$fqcn | string |
Returns ?ClassDoc
public function has(string $fqcn): bool
| Parameter | Type | Description |
|---|---|---|
$fqcn | string |
Returns bool
inNamespace()
Section titled “inNamespace()”public function inNamespace(string $namespace): list<ClassDoc>
| Parameter | Type | Description |
|---|---|---|
$namespace | string |
Returns list``<ClassDoc>
namespaces()
Section titled “namespaces()”public function namespaces(): list<string>
Returns list``<``string``> — Namespaces that hold at least one class, ordered by name.
navigableNamespaces()
Section titled “navigableNamespaces()”public function navigableNamespaces(): list<string>
Every namespace that needs a page, including the ones holding nothing but other namespaces.
Quiote\Config\Util declares no types of its own, only Quiote\Config\Util\DOM below it. It still has to exist as a page, because the level above links to it on the way down.
Returns list``<``string``>
slugFor()
Section titled “slugFor()”public function slugFor(string $fqcn): ?string
The page path for a documented class, or null when it is not part of the reference.
| Parameter | Type | Description |
|---|---|---|
$fqcn | string |
Returns ?``string
slugger()
Section titled “slugger()”public function slugger(): Slugger
Returns Slugger
topLevelNamespaces()
Section titled “topLevelNamespaces()”public function topLevelNamespaces(): list<string>
The namespaces the reference lists in its navigation: one level below the framework root, which is the granularity a sidebar can carry without putting every class on every page.
Returns list``<``string``>
under()
Section titled “under()”public function under(string $namespace): list<ClassDoc>
| Parameter | Type | Description |
|---|---|---|
$namespace | string |
Returns list``<ClassDoc> — Every class at or below $namespace.