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