/** * Load and register a model * * @static * @access public * @param Core\Registry $registry DPI container * @param string $name Model name * @return mixed */ public static function loadModel(Registry $registry, $name) { if (!isset($registry->{$name})) { $class = '\\Model\\' . ucfirst($name); $registry->{$name} = new $class($registry); } return $registry->shared($name); }