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 Yiisoft\ActiveRecord\AbstractActiveRecord::populateProperty().
Public Methods
| Method | Description | Defined By |
|---|---|---|
| get() | Yiisoft\ActiveRecord\Trait\PrivatePropertiesTrait |
Protected Methods
| Method | Description | Defined By |
|---|---|---|
| populateProperty() | Yiisoft\ActiveRecord\Trait\PrivatePropertiesTrait |
Method Details
| public mixed get ( string $propertyName ) | ||
| $propertyName | string | |
public function get(string $propertyName): mixed
{
return $this->$propertyName ?? null;
}
Signup or Login in order to comment.