Skip to content
PHP Ecosystem
Explore

ConfigDataFactory

API reference › Yii3 Debug › ConfigDataFactory

final readonly classYii3\Debug\ConfigDataFactory
Sourcesrc/ConfigDataFactory.php

Creates the live Yii and PHP configuration shown by the Configuration page.

Application metadata the application does not declare falls back to the runtime: the Composer root package supplies the name and version, APP_ENV the environment, and APP_DEBUG the debug mode.

MethodDescriptionDefined by
__construct()Creates the configuration-data factory with optional application metadata.ConfigDataFactory
create()Builds the Configuration panel payload from the live application and PHP runtime.ConfigDataFactory
public function __construct(array<string, mixed> $application = [])

Creates the configuration-data factory with optional application metadata.

Parameters

ParameterTypeDescription
$applicationarray<string, mixed>Optional application metadata.
public function create(): array<string, mixed>

Builds the Configuration panel payload from the live application and PHP runtime.

Returns

array<string, mixed>: Payload accepted by the shared Configuration presenter.