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:
Abel Hoogeveen 2020-06-07 12:18:34 +02:00
parent e30d4ad366
commit d6fcf1c750
No known key found for this signature in database
GPG Key ID: 96C2234920BF4292
4 changed files with 4 additions and 4 deletions

View File

@ -13,7 +13,7 @@
}
],
"require": {
"php": ">=7.1.0",
"php": ">=7.3.0",
"fuzeworks/core": "~1.2.0"
},
"require-dev": {

View File

@ -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)

View File

@ -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");

View File

@ -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)