aboutsummaryrefslogtreecommitdiffstats
path: root/core/namespace/Application.php
diff options
context:
space:
mode:
authorThomas Lange <code@nerdmind.de>2021-07-22 14:00:12 +0200
committerThomas Lange <code@nerdmind.de>2021-07-22 14:00:12 +0200
commit59392e460020447720089976b83139ad59d275fe (patch)
tree25cc766f352d9ae6319d22d43388db563d6ba404 /core/namespace/Application.php
parent912a19ef8c58b87ac075d21cee0425f7715b4f94 (diff)
downloadblog-59392e460020447720089976b83139ad59d275fe.tar.gz
blog-59392e460020447720089976b83139ad59d275fe.tar.xz
blog-59392e460020447720089976b83139ad59d275fe.zip
Rename: Append "Repository" to repository classes
Rename the repository classes and append the name with "Repository" to prevent naming confusions with the entity classes.
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;
}