- WIP on Dataset and Migration attribute
- Removed unused PdoObject and added a new PdoDebugQueryInterface which is still a hugh WIP
This commit is contained in:
1 parent
47aa384c4b
commit
1c03860fc4
12 files changed
+66
-235
No files matched your search
@@ -84,7 +84,6 @@ class RelationBuilder
|
||||
}
|
||||
}
|
||||
catch(\Throwable $e) {
|
||||
|
||||
throw new $e(sprintf("An error occurred while calling method from your #[Virtual] attribute in entity '%s::%s'. Caught '%s'", $this->entity::class, $name, $e->getMessage(), $e->getCode(), $e ));
|
||||
}
|
||||
}
|
||||
@@ -156,7 +155,12 @@ class RelationBuilder
|
||||
protected function applyFilter(Repository $repository, string $name) : Repository
|
||||
{
|
||||
foreach($this->filters ?? [] as $filter) {
|
||||
$repository = call_user_func_array([ $this->entity, $filter->method ], [ $repository, $name, false ]);
|
||||
if (is_string($filter->method)) {
|
||||
$repository = call_user_func_array([$this->entity, $filter->method], [$repository, $name, false]);
|
||||
}
|
||||
elseif (is_callable($filter->method)) {
|
||||
$repository = call_user_func_array($filter->method, [ $repository, $this->entity, false, ], );
|
||||
}
|
||||
}
|
||||
|
||||
return $repository;
|
||||
|
||||
Reference in new issue
Block a user