Trait Yiisoft\ActiveRecord\Trait\PrivatePropertiesTrait
Trait to handle private properties in Active Record classes.
The trait required when using private properties inside the model class.
See also:
Protected Methods
| Method | Description | Defined By |
|---|---|---|
| populateProperty() | Yiisoft\ActiveRecord\Trait\PrivatePropertiesTrait | |
| propertyValuesInternal() | Yiisoft\ActiveRecord\Trait\PrivatePropertiesTrait |
Method Details
| protected void populateProperty ( string $name, mixed $value ) | ||
| $name | string | |
| $value | mixed | |
protected function populateProperty(string $name, mixed $value): void
{
$this->$name = $value;
}
| protected array propertyValuesInternal ( ) |
protected function propertyValuesInternal(): array
{
return get_object_vars($this);
}
Signup or Login in order to comment.