Skip to content

Commit

Permalink
Merge pull request #81 from atk4/DarkSide666-patch-1
Browse files Browse the repository at this point in the history
Field new method set() which set field value in model
  • Loading branch information
romaninsh committed Aug 2, 2016
2 parents d330d9a + 46ac94e commit c877f11
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions src/Field.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,29 @@ public function __construct($defaults = [])
}

/**
* Returns this field object.
* Returns field value.
*
* @return Field
* @return mixed
*/
public function get()
{
return $this->owner[$this->short_name];
}

/**
* Sets field value.
*
* @param mixed $value
*
* @return $this
*/
public function set($value)
{
$this->owner[$this->short_name] = $value;

return$this;
}

/**
* Sets field attribute value.
*
Expand Down

0 comments on commit c877f11

Please sign in to comment.