From 99b24155d36d6d5a40e5a67ce675807b5b6191bc Mon Sep 17 00:00:00 2001 From: Abel Hoogeveen Date: Mon, 29 Nov 2021 23:06:37 +0100 Subject: [PATCH] Upgraded libraries and added objectstorage. --- README.md | 2 +- composer.json | 21 ++++++++------------- src/FuzeWorks/WebAppComponent.php | 7 +++++-- src/FuzeWorks/WebAppController.php | 6 +++++- src/FuzeWorks/WebAppModel.php | 9 ++++++--- src/FuzeWorks/WebAppView.php | 2 +- 6 files changed, 26 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 27c7ff9..b21ef48 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ FuzeWorks::WebApp Component - Readme =================== -Version 1.2.0 +Version 1.3.0 A versatile PHP Framework built to perform. diff --git a/composer.json b/composer.json index 0857e3e..73ca557 100644 --- a/composer.json +++ b/composer.json @@ -4,22 +4,18 @@ "license": ["MIT"], "authors": [ { - "name": "TechFuze", - "homepage": "https://techfuze.net" - }, - { - "name": "FuzeWorks Community", - "homepage": "https://techfuze.net/fuzeworks/contributors" + "name": "Abel Hoogeveen", + "homepage": "https://i15.nl" } ], "require": { "php": ">=7.4.0", - "fuzeworks/webcomponent": "~1.2.7", - "fuzeworks/tracycomponent": "~1.2.1", - "fuzeworks/layout": "~1.2.0", - "fuzeworks/database": "~1.2.3", - "smarty/smarty": "3.1.*", - "latte/latte": "2.10.*", + "fuzeworks/webcomponent": "~1.3.0", + "fuzeworks/objectstorage": "~1.3.0", + "fuzeworks/tracycomponent": "~1.3.0", + "fuzeworks/layout": "~1.3.0", + "fuzeworks/database": "~1.3.0", + "latte/latte": "~2.5", "ext-json": "*" }, "autoload": { @@ -27,5 +23,4 @@ "FuzeWorks\\": "src/FuzeWorks/" } } - } diff --git a/src/FuzeWorks/WebAppComponent.php b/src/FuzeWorks/WebAppComponent.php index 432ef28..56b3eee 100644 --- a/src/FuzeWorks/WebAppComponent.php +++ b/src/FuzeWorks/WebAppComponent.php @@ -31,15 +31,17 @@ * @link http://techfuze.net/fuzeworks * @since Version 0.0.1 * - * @version Version 1.2.0 + * @version Version 1.3.0 */ namespace FuzeWorks; +use FuzeWorks\ObjectStorage\ObjectStorageComponent; + class WebAppComponent implements iComponent { - protected $willHandleRequest = false; + protected bool $willHandleRequest = false; public function getName(): string { @@ -62,6 +64,7 @@ class WebAppComponent implements iComponent // And add the component $configurator->addComponent($webComponent); + $configurator->addComponent(new ObjectStorageComponent()); $configurator->addComponent(new DatabaseComponent()); $configurator->addComponent(new LayoutComponent()); $configurator->addComponent(new TracyComponent()); diff --git a/src/FuzeWorks/WebAppController.php b/src/FuzeWorks/WebAppController.php index 2102b5f..dad3f7c 100644 --- a/src/FuzeWorks/WebAppController.php +++ b/src/FuzeWorks/WebAppController.php @@ -31,7 +31,7 @@ * @link http://techfuze.net/fuzeworks * @since Version 1.2.0 * - * @version Version 1.2.0 + * @version Version 1.3.0 */ namespace FuzeWorks; @@ -44,11 +44,15 @@ abstract class WebAppController extends WebController */ protected $databases; + /** @var ObjectStorage\ObjectStorageComponent */ + protected $storage; + public function __construct() { parent::__construct(); // Load all the requirements for the WebAppController, not yet loaded by any of the parent controller classes $this->databases = Factory::getInstance('databases'); + $this->storage = Factory::getInstance('storage'); } } \ No newline at end of file diff --git a/src/FuzeWorks/WebAppModel.php b/src/FuzeWorks/WebAppModel.php index bf98666..90b3327 100644 --- a/src/FuzeWorks/WebAppModel.php +++ b/src/FuzeWorks/WebAppModel.php @@ -31,12 +31,11 @@ * @link http://techfuze.net/fuzeworks * @since Version 1.2.0 * - * @version Version 1.2.0 + * @version Version 1.3.0 */ namespace FuzeWorks; - abstract class WebAppModel extends WebModel { /** @@ -44,11 +43,15 @@ abstract class WebAppModel extends WebModel */ protected $databases; + /** @var ObjectStorage\ObjectStorageComponent */ + protected $storage; + public function __construct() { parent::__construct(); // Load all requirements for the WebAppModel, not yet loaded by parent Model - $this->databases = Factory::getInstance()->databases; + $this->databases = Factory::getInstance('databases'); + $this->storage = Factory::getInstance('storage'); } } \ No newline at end of file diff --git a/src/FuzeWorks/WebAppView.php b/src/FuzeWorks/WebAppView.php index 3ad0d87..c04481b 100644 --- a/src/FuzeWorks/WebAppView.php +++ b/src/FuzeWorks/WebAppView.php @@ -50,7 +50,7 @@ abstract class WebAppView extends WebView parent::__construct(); // Load all requirements for the WebAppView, not yet loaded by parent Views - $this->layouts = Factory::getInstance()->layouts; + $this->layouts = Factory::getInstance('layouts'); } } \ No newline at end of file