CreateObjectConfiguration
API reference › PHPStan › rules › CreateObjectConfiguration
Represents a BaseYii::createObject() configuration whose class and assignment path are proven.
CreateObjectConfigurationResolver for the conditions under which a configuration is resolved.
Properties
Section titled “Properties”| Property | Type | Description | Defined by |
|---|---|---|---|
$calledClass readonly constructor | string | Class through which createObject() is called, as PHPStan displays it. | CreateObjectConfiguration |
$classReflection readonly constructor | PHPStan\ | Class Yii creates and configures. | CreateObjectConfiguration |
$options readonly constructor | list<array{string, | Name, reported line and effective value of each distinct option that Yii assigns, in first-occurrence order: the value expression of an array literal whose keys are all literal strings, otherwise the value type of the constant native array. class and __class are present only when they come from a constructor argument used as the configuration. | CreateObjectConfiguration |
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
__construct() | Stores the called class, resolved class and effective configuration options. | CreateObjectConfiguration |
Method details
Section titled “Method details”__construct()
Section titled “__construct() ”public function __construct(string $calledClass, PHPStan\Reflection\ClassReflection $classReflection, list<array{string, int, PhpParser\Node\Expr|PHPStan\Type\Type}> $options)Stores the called class, resolved class and effective configuration options.
Parameters
| Parameter | Type | Description |
|---|---|---|
$calledClass | string | Class through which createObject() is called, as PHPStan displays it. |
$classReflection | PHPStan\ | Class Yii creates and configures. |
$options | list<array{string, | Name, reported line and effective value of each distinct option that Yii assigns, in first-occurrence order: the value expression of an array literal whose keys are all literal strings, otherwise the value type of the constant native array. class and __class are present only when they come from a constructor argument used as the configuration. |