aboutsummaryrefslogtreecommitdiffstats
path: root/core/namespace/Application.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/namespace/Application.php')
-rw-r--r--core/namespace/Application.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/namespace/Application.php b/core/namespace/Application.php
index 140baac..93361dd 100644
--- a/core/namespace/Application.php
+++ b/core/namespace/Application.php
@@ -102,10 +102,10 @@ class Application {
#===============================================================================
public static function getRepository(string $entity): ORM\Repository {
$identifier = strtolower($entity);
- $repository = "ORM\Repositories\\$entity";
if(!isset(self::$repositories[$identifier])) {
- $Repository = new $repository(self::getDatabase());
+ $className = sprintf('ORM\Repositories\%sRepository', $entity);
+ $Repository = new $className(self::getDatabase());
self::$repositories[$identifier] = $Repository;
}