Authentication backends refactoring

This commit is contained in:
Frédéric Guillot
2014-08-16 13:59:37 -07:00
parent 498408d507
commit 925b0ba2e5
20 changed files with 719 additions and 455 deletions

View File

@@ -34,8 +34,11 @@ class Tool
public static function loadModel(Registry $registry, $name)
{
$class = '\Model\\'.ucfirst($name);
$registry->$name = new $class($registry);
if (! isset($registry->$name)) {
$class = '\Model\\'.ucfirst($name);
$registry->$name = new $class($registry);
}
return $registry->shared($name);
}
}