0 follower

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().

Method Details

Hide inherited methods

get() public method

public mixed get ( string $propertyName )
$propertyName string

                public function get(string $propertyName): mixed
{
    return $this->$propertyName ?? null;
}

            
populateProperty() protected method

protected void populateProperty ( string $name, mixed $value )
$name string
$value mixed

                protected function populateProperty(string $name, mixed $value): void
{
    $this->$name = $value;
}