mirror of
https://github.com/fzaninotto/Faker.git
synced 2025-03-22 00:09:59 +01:00
Temporary solution which allow to call method on entity with 1 parameter
* this will be solved later with arbitrary number of parameters
This commit is contained in:
parent
9d7bf61772
commit
6d051d4c6c
@ -94,7 +94,11 @@ class EntityPopulator
|
||||
foreach ($this->columnFormatters as $field => $format) {
|
||||
if (null !== $format) {
|
||||
$value = is_callable($format) ? $format($insertedEntities, $obj) : $format;
|
||||
$this->class->reflFields[$field]->setValue($obj, $value);
|
||||
if (is_callable(array($obj, $field))) {
|
||||
$obj->$field($value);
|
||||
} else {
|
||||
$this->class->reflFields[$field]->setValue($obj, $value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user