PanelRegistry
API reference › Debug Core › Registration › PanelRegistry
Resolves provider defaults against the application configuration into one effective panel catalog.
Built-ins keep their registration order and every extension follows, ordered by position ascending, then by effective title case-insensitively, then by ID.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
disabled() | Returns the disabled panel IDs, including entries with no default. | PanelRegistry |
enabled() | Returns the effective panel registrations in display order. | PanelRegistry |
get() | Returns the effective registration of a panel. | PanelRegistry |
isDisabled() | Returns whether the configuration removed a panel. | PanelRegistry |
resolve() static | Merges provider defaults with the application configuration and computes the display order. | PanelRegistry |
Method details
Section titled “Method details”disabled()
Section titled “disabled() ”public function disabled(): list<string>Returns the disabled panel IDs, including entries with no default.
Returns
list<string>: IDs removed by configuration, sorted alphabetically.
enabled()
Section titled “enabled() ”public function enabled(): list<PHPForge\Debug\Registration\PanelRegistration>Returns the effective panel registrations in display order.
Returns
list<PanelRegistration>: Effective registrations in display order.
get()
Section titled “get() ”public function get(string $id): PHPForge\Debug\Registration\PanelRegistration|nullReturns the effective registration of a panel.
Parameters
| Parameter | Type | Description |
|---|---|---|
$id | string | Stable panel identifier. |
Returns
PanelRegistration|null: Effective registration, or null when the ID is unknown or disabled.
isDisabled()
Section titled “isDisabled() ”public function isDisabled(string $id): boolReturns whether the configuration removed a panel.
Parameters
| Parameter | Type | Description |
|---|---|---|
$id | string | Stable panel identifier. |
Returns
bool: Whether the ID is disabled.
resolve()
Section titled “resolve() ”public static function resolve(iterable<PHPForge\Debug\Registration\PanelRegistration> $defaults, iterable<string, PHPForge\Debug\Registration\PanelOverride> $overrides = []): selfMerges provider defaults with the application configuration and computes the display order.
An override targeting an ID with no default is accepted only when it disables the entry, which covers an optional package that is not installed; any other override for an unknown ID is a typo and is rejected.
Parameters
| Parameter | Type | Description |
|---|---|---|
$defaults | iterable<PanelRegistration> | Host built-ins first, then providers, with provider defaults. |
$overrides | iterable<string, PanelOverride> | Application configuration indexed by panel ID. |
Returns
self: Resolved catalog.
Throws
InvalidArgumentException: When a default ID is registered twice, an override targets an unknown ID without disabling it, or an override sets a position on a built-in panel.