Merge branch 'develop' into release
This commit is contained in:
@ -151,6 +151,9 @@ abstract class Repository implements RepositoryInterface
|
||||
{
|
||||
foreach ($this->getRequired() as $column) {
|
||||
$m = $this->getMethod($column, false);
|
||||
if (!method_exists($model, $m)) {
|
||||
continue;
|
||||
}
|
||||
$model->{$m}($data[$column]);
|
||||
}
|
||||
foreach ($this->getOptional() as $column) {
|
||||
@ -158,6 +161,9 @@ abstract class Repository implements RepositoryInterface
|
||||
continue;
|
||||
}
|
||||
$m = $this->getMethod($column, false);
|
||||
if (!method_exists($model, $m)) {
|
||||
continue;
|
||||
}
|
||||
$model->{$m}($data[$column]);
|
||||
}
|
||||
return $model;
|
||||
@ -169,6 +175,9 @@ abstract class Repository implements RepositoryInterface
|
||||
continue;
|
||||
}
|
||||
$m = $this->getMethod($column);
|
||||
if (!method_exists($model, $m)) {
|
||||
continue;
|
||||
}
|
||||
$val = $model->{$m}();
|
||||
$data[$column] = $val;
|
||||
}
|
||||
@ -217,6 +226,9 @@ abstract class Repository implements RepositoryInterface
|
||||
foreach ($this->getColumns() as $col) {
|
||||
if (isset($data[$col])) {
|
||||
$m = $this->getMethod($col, false);
|
||||
if (!method_exists($model, $m)) {
|
||||
continue;
|
||||
}
|
||||
$model->{$m}($data[$col]);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user