Release version 1.2.2.
Now supports loading Controllers, Models and Views using the autoloader, which for some reason wasn't supported.
This commit is contained in:
parent
e30d4ad366
commit
d6fcf1c750
@ -13,7 +13,7 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=7.1.0",
|
||||
"php": ">=7.3.0",
|
||||
"fuzeworks/core": "~1.2.0"
|
||||
},
|
||||
"require-dev": {
|
||||
|
@ -128,7 +128,7 @@ class Controllers
|
||||
// If the class already exists, return a new instance directly
|
||||
$class = ucfirst($class);
|
||||
$className = $namespace . $class . 'Controller';
|
||||
if (class_exists($className, false))
|
||||
if (class_exists($className, true))
|
||||
{
|
||||
$controller = new $className(...$arguments);
|
||||
if (!$controller instanceof Controller)
|
||||
|
@ -128,7 +128,7 @@ class Models
|
||||
// If the class already exists, return a new instance directly
|
||||
$class = ucfirst($class);
|
||||
$className = $namespace . $class . 'Model';
|
||||
if (class_exists($className, false)) {
|
||||
if (class_exists($className, true)) {
|
||||
$model = new $className(...$arguments);
|
||||
if (!$model instanceof Model)
|
||||
throw new ModelException("Could not load model. Provided modelName is not instance of \FuzeWorks\Model");
|
||||
|
@ -131,7 +131,7 @@ class Views
|
||||
// If the class already exists, return a new instance directly
|
||||
$class = ucfirst($class);
|
||||
$className = $namespace . $class . $viewType . 'View';
|
||||
if (class_exists($className, false)) {
|
||||
if (class_exists($className, true)) {
|
||||
/** @var View $view */
|
||||
$view = new $className(...$arguments);
|
||||
if (!$view instanceof View)
|
||||
|
Loading…
Reference in New Issue
Block a user