PhpInfoDataNormalizer
API reference › Debug Core › PhpInfo › PhpInfoDataNormalizer
Narrows the raw phpinfo() HTML output into the typed PhpInfoView.
Splits the captured body into the overview chunk (everything before the first <h2>) and the modules chunk (every
module heading + table that follows), parses each <tr><td>k</td><td>v</td></tr> pair into a key/value map, builds
the five hero sections (‘PHP version’ / ‘Build’ / ‘Configuration’ / ‘Capabilities’ / ‘Streams’) with typed tiles,
and wraps every module <table> in the panel’s table chrome plus a deep-link <section> so the search filter and
the TOC can hide / jump to it.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
capture() static | Captures the phpinfo() report of the current process and narrows it into the typed PhpInfoView. | PhpInfoDataNormalizer |
fromOutput() static | Builds the typed view-model from the raw phpinfo() HTML body, the runtime metrics PHP itself reports (SAPI, OS, memory limit) and the active PHP_VERSION constant. | PhpInfoDataNormalizer |
Method details
Section titled “Method details”capture()
Section titled “capture() ”public static function capture(): PHPForge\Debug\PhpInfo\PhpInfoViewCaptures the phpinfo() report of the current process and narrows it into the typed PhpInfoView.
Returns
PhpInfoView: Typed view-model for the running PHP process.
fromOutput()
Section titled “fromOutput() ”public static function fromOutput(string $body, string $phpVersion, string $sapi, string $os, string $memoryLimit): PHPForge\Debug\PhpInfo\PhpInfoViewBuilds the typed view-model from the raw phpinfo() HTML body, the runtime metrics PHP itself reports
(SAPI, OS, memory limit) and the active PHP_VERSION constant.
Parameters
| Parameter | Type | Description |
|---|---|---|
$body | string | Captured phpinfo() output, already narrowed to its <body> content. |
$phpVersion | string | Running PHP version used as the hero headline. |
$sapi | string | Server API name. |
$os | string | Host operating system description. |
$memoryLimit | string | Effective memory_limit directive. |
Returns