forked from GNUsocial/gnu-social
[DB] Add support for calling methods with FQCN
This commit is contained in:
parent
f4e52f5e11
commit
29f30a6932
@ -107,8 +107,9 @@ abstract class DB
|
||||
public static function __callStatic(string $name, array $args)
|
||||
{
|
||||
foreach (['find', 'getReference', 'getPartialReference', 'getRepository'] as $m) {
|
||||
if ($name == $m) {
|
||||
$args[0] = '\App\Entity\\' . ucfirst(Formatting::snakeCaseToCamelCase($args[0]));
|
||||
$pref = '\App\Entity\\';
|
||||
if ($name == $m && Formatting::startsWith($name, $pref) === false) {
|
||||
$args[0] = $pref . ucfirst(Formatting::snakeCaseToCamelCase($args[0]));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user