PhpInfoModuleGroup
API reference › Debug Core › PhpInfo › PhpInfoModuleGroup
Groups phpinfo() modules by the job they perform.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
bucket() static | Buckets items by the group owning their module title, keeping every label in TOC display order with OTHER last. Groups nothing lands in stay empty rather than disappearing, so callers decide whether to skip them. | PhpInfoModuleGroup |
isExtension() static | Whether the module describes a PHP extension rather than a reporting block. | PhpInfoModuleGroup |
resolve() static | Returns the group label owning the module, or OTHER when the module is unknown. | PhpInfoModuleGroup |
Constants
Section titled “Constants”| Constant | Value | Description | Defined by |
|---|---|---|---|
ENVIRONMENT | 'Environment' | Reporting blocks that phpinfo() emits as modules but that describe the environment, not an extension. | PhpInfoModuleGroup |
OTHER | 'Other' | Bucket for unknown and third-party modules. | PhpInfoModuleGroup |
Method details
Section titled “Method details”bucket()
Section titled “bucket() ”public static function bucket(list<PHPForge\Debug\PhpInfo\T> $items, callable(PHPForge\Debug\PhpInfo\T): string $title): array<string, list<PHPForge\Debug\PhpInfo\T>>Buckets items by the group owning their module title, keeping every label in TOC display order with
OTHER last. Groups nothing lands in stay empty rather than disappearing, so callers decide whether to
skip them.
Parameters
| Parameter | Type | Description |
|---|---|---|
$items | list<PHPForge\ | Items to bucket. |
$title | callable(PHPForge\ | Reads the module title from an item. |
Returns
array<string, list<PHPForge\Debug\PhpInfo\T>>: Items per group label.
isExtension()
Section titled “isExtension() ”public static function isExtension(string $title): boolWhether the module describes a PHP extension rather than a reporting block.
resolve()
Section titled “resolve() ”public static function resolve(string $title): stringReturns the group label owning the module, or OTHER when the module is unknown.