From 59392e460020447720089976b83139ad59d275fe Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Thu, 22 Jul 2021 14:00:12 +0200 Subject: Rename: Append "Repository" to repository classes Rename the repository classes and append the name with "Repository" to prevent naming confusions with the entity classes. --- core/namespace/Application.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/namespace/Application.php') 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; } -- cgit v1.2.3