WidgetConfiguration
API reference › PHPStan › rules › WidgetConfiguration
Represents the configuration of a Widget::widget() or Widget::begin() call whose class and assignment
path are proven.
WidgetConfigurationResolver for the conditions under which a configuration is resolved.
Properties
Section titled “Properties”| Property | Type | Description | Defined by |
|---|---|---|---|
$configuration readonly constructor | CreateObjectConfiguration | Configuration that Yii::createObject() receives from the method: the called class as PHPStan displays it, the widget class Yii creates and the options it assigns. | WidgetConfiguration |
$method readonly constructor | string | Name of the called method as Widget declares it: widget or begin. | WidgetConfiguration |
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
__construct() | Stores the widget creation method and its resolved configuration. | WidgetConfiguration |
Method details
Section titled “Method details”__construct()
Section titled “__construct() ”public function __construct(string $method, yii2\extensions\phpstan\rules\CreateObjectConfiguration $configuration)Stores the widget creation method and its resolved configuration.
Parameters
| Parameter | Type | Description |
|---|---|---|
$method | string | Name of the called method as Widget declares it: widget or begin. |
$configuration | CreateObjectConfiguration | Configuration that Yii::createObject() receives from the method: the called class as PHPStan displays it, the widget class Yii creates and the options it assigns. |