src/Mappable.php
protected function setMappedAttribute($key, $value)
    {
        $segments = explode('.', $this->getMappingForAttribute($key));

        $attribute = array_pop($segments);

        if ($target = $this->getTarget($this, $segments)) {
            $this->addTargetToSave($target);

            $target->{$attribute} = $value;
        }
    }
protected function setMappedAttribute($key, $value)
    {
        $segments = explode('.', $this->getMappingForAttribute($key));

        $attribute = array_pop($segments);

        if ($target = $this->getTarget($this, $segments)) {
            $this->addTargetToSave($target);

            $target->{$attribute} = $value;
        }
    }
protected function setMappedAttribute ( $ key , $ value ) { $ segments = explode ( '.' , $ this -> getMappingForAttribute ( $ key ) ) ; $ attribute = array_pop ( $ segments ) ; if ( $ target = $ this -> getTarget ( $ this , $ segments ) ) { $ this -> addTargetToSave ( $ target ) ; $ target -> { $ attribute } = $ value ; } }
Set value of a mapped attribute.

@param string $key
@param mixed  $value
Set value of a mapped attribute .