src/Attributes.php
private function setPropertyFor($attribute, $property, $value, $action, $changeTracking = true) {
    if (! $this->has($attribute)) {return;}

    if ($changeTracking) {
      $this->__attributes[$attribute]['changes'][] = [
        'action' => $action,
        'from'   => $this->get($attribute),
        'to'     => $value,
        'when'   => new DateTime('now', new DateTimezone('UTC'))
      ];
    }

    $this->__attributes[$attribute][$property]     = $value;
  }
private function setPropertyFor($attribute, $property, $value, $action, $changeTracking = true) {
    if (! $this->has($attribute)) {return;}

    if ($changeTracking) {
      $this->__attributes[$attribute]['changes'][] = [
        'action' => $action,
        'from'   => $this->get($attribute),
        'to'     => $value,
        'when'   => new DateTime('now', new DateTimezone('UTC'))
      ];
    }

    $this->__attributes[$attribute][$property]     = $value;
  }
private function setPropertyFor ( $ attribute , $ property , $ value , $ action , $ changeTracking = true ) { if ( ! $ this -> has ( $ attribute ) ) { return ; } if ( $ changeTracking ) { $ this -> __attributes [ $ attribute ] [ 'changes' ] [ ] = [ 'action' => $ action , 'from' => $ this -> get ( $ attribute ) , 'to' => $ value , 'when' => new DateTime ( 'now' , new DateTimezone ( 'UTC' ) ) ] ; } $ this -> __attributes [ $ attribute ] [ $ property ] = $ value ; }
`setPropertyFor` sets an attribute property value

@param   string  $attribute  attribute name
@param   string  $property   property name
@param   mixed   $value      property value

@return  boolean
setPropertyFor sets an attribute property value