From 0a58487bbd120b9803f2613ca872ce69bec0519b Mon Sep 17 00:00:00 2001 From: Gunnar Wrobel
Date: Wed, 29 Apr 2009 05:35:08 +0200 Subject: [PATCH] Reorder the application to get a structure that makes sense within a PEAR package. --- koward/lib/{ => Koward}/Cli.php | 0 .../Koward/Controller/Application.php} | 6 +++--- .../{app/controllers => lib/Koward/Controller}/CheckController.php | 5 +---- .../{app/controllers => lib/Koward/Controller}/IndexController.php | 5 +---- .../{app/controllers => lib/Koward/Controller}/ObjectController.php | 0 koward/lib/{ => Koward}/Exception.php | 0 koward/lib/{ => Koward}/Form/Actions.php | 0 koward/lib/{ => Koward}/Form/Object.php | 0 koward/lib/{ => Koward}/Form/Search.php | 0 koward/lib/{ => Koward}/Test.php | 0 koward/lib/{ => Koward}/Test/AllTests.php | 0 koward/lib/{ => Koward}/Test/Renderer.php | 0 koward/lib/{ => Koward}/Test/Server/UserTest.php | 0 koward/lib/{ => Koward}/Test/Template/scenario.html.dist | 0 koward/lib/{ => Koward}/Test/Template/scenario_header.html.dist | 0 koward/lib/{ => Koward}/Test/Template/scenarios.html.dist | 0 koward/lib/{ => Koward}/Test/Template/step.html.dist | 0 koward/{app/views => lib/Koward/View}/Check/run.html.php | 0 koward/{app/views => lib/Koward/View}/Check/show.html.php | 0 koward/{app/views => lib/Koward/View}/Index/index.html.php | 0 koward/{app/views => lib/Koward/View}/Modify/add.html.php | 0 koward/{app/views => lib/Koward/View}/Object/delete.html.php | 0 koward/{app/views => lib/Koward/View}/Object/edit.html.php | 0 koward/{app/views => lib/Koward/View}/Object/listall.html.php | 0 koward/{app/views => lib/Koward/View}/Object/search.html.php | 0 koward/{app/views => lib/Koward/View}/Object/view.html.php | 0 koward/{app/views => lib/Koward/View}/shared/_header.html.php | 0 koward/{app/views => lib/Koward/View}/shared/_menu.html.php | 0 28 files changed, 5 insertions(+), 11 deletions(-) rename koward/lib/{ => Koward}/Cli.php (100%) rename koward/{app/controllers/ApplicationController.php => lib/Koward/Controller/Application.php} (87%) rename koward/{app/controllers => lib/Koward/Controller}/CheckController.php (90%) rename koward/{app/controllers => lib/Koward/Controller}/IndexController.php (62%) rename koward/{app/controllers => lib/Koward/Controller}/ObjectController.php (100%) rename koward/lib/{ => Koward}/Exception.php (100%) rename koward/lib/{ => Koward}/Form/Actions.php (100%) rename koward/lib/{ => Koward}/Form/Object.php (100%) rename koward/lib/{ => Koward}/Form/Search.php (100%) rename koward/lib/{ => Koward}/Test.php (100%) rename koward/lib/{ => Koward}/Test/AllTests.php (100%) rename koward/lib/{ => Koward}/Test/Renderer.php (100%) rename koward/lib/{ => Koward}/Test/Server/UserTest.php (100%) rename koward/lib/{ => Koward}/Test/Template/scenario.html.dist (100%) rename koward/lib/{ => Koward}/Test/Template/scenario_header.html.dist (100%) rename koward/lib/{ => Koward}/Test/Template/scenarios.html.dist (100%) rename koward/lib/{ => Koward}/Test/Template/step.html.dist (100%) rename koward/{app/views => lib/Koward/View}/Check/run.html.php (100%) rename koward/{app/views => lib/Koward/View}/Check/show.html.php (100%) rename koward/{app/views => lib/Koward/View}/Index/index.html.php (100%) rename koward/{app/views => lib/Koward/View}/Modify/add.html.php (100%) rename koward/{app/views => lib/Koward/View}/Object/delete.html.php (100%) rename koward/{app/views => lib/Koward/View}/Object/edit.html.php (100%) rename koward/{app/views => lib/Koward/View}/Object/listall.html.php (100%) rename koward/{app/views => lib/Koward/View}/Object/search.html.php (100%) rename koward/{app/views => lib/Koward/View}/Object/view.html.php (100%) rename koward/{app/views => lib/Koward/View}/shared/_header.html.php (100%) rename koward/{app/views => lib/Koward/View}/shared/_menu.html.php (100%) diff --git a/koward/lib/Cli.php b/koward/lib/Koward/Cli.php similarity index 100% rename from koward/lib/Cli.php rename to koward/lib/Koward/Cli.php diff --git a/koward/app/controllers/ApplicationController.php b/koward/lib/Koward/Controller/Application.php similarity index 87% rename from koward/app/controllers/ApplicationController.php rename to koward/lib/Koward/Controller/Application.php index 212890b23..e28fb3d0d 100644 --- a/koward/app/controllers/ApplicationController.php +++ b/koward/lib/Koward/Controller/Application.php @@ -1,14 +1,14 @@ koward = Koward_Koward::singleton(); + $this->koward = Koward::singleton(); $this->types = array_keys($this->koward->objects); if (empty($this->types)) { - throw new KowardException('No object types have been configured!'); + throw new Koward_Exception('No object types have been configured!'); } $this->menu = $this->getMenu(); diff --git a/koward/app/controllers/CheckController.php b/koward/lib/Koward/Controller/CheckController.php similarity index 90% rename from koward/app/controllers/CheckController.php rename to koward/lib/Koward/Controller/CheckController.php index 39bf83e5b..c3642f7b3 100644 --- a/koward/app/controllers/CheckController.php +++ b/koward/lib/Koward/Controller/CheckController.php @@ -3,13 +3,10 @@ * @package Koward */ -// @TODO Clean up -require_once dirname(__FILE__) . '/ApplicationController.php'; - /** * @package Koward */ -class CheckController extends Koward_ApplicationController +class CheckController extends Koward_Controller_Application { protected function _initializeApplication() diff --git a/koward/app/controllers/IndexController.php b/koward/lib/Koward/Controller/IndexController.php similarity index 62% rename from koward/app/controllers/IndexController.php rename to koward/lib/Koward/Controller/IndexController.php index 40e2c7702..52dba4c2d 100644 --- a/koward/app/controllers/IndexController.php +++ b/koward/lib/Koward/Controller/IndexController.php @@ -3,13 +3,10 @@ * @package Koward */ -// @TODO Clean up -require_once dirname(__FILE__) . '/ApplicationController.php'; - /** * @package Koward */ -class IndexController extends Koward_ApplicationController +class IndexController extends Koward_Controller_Application { protected $welcome; diff --git a/koward/app/controllers/ObjectController.php b/koward/lib/Koward/Controller/ObjectController.php similarity index 100% rename from koward/app/controllers/ObjectController.php rename to koward/lib/Koward/Controller/ObjectController.php diff --git a/koward/lib/Exception.php b/koward/lib/Koward/Exception.php similarity index 100% rename from koward/lib/Exception.php rename to koward/lib/Koward/Exception.php diff --git a/koward/lib/Form/Actions.php b/koward/lib/Koward/Form/Actions.php similarity index 100% rename from koward/lib/Form/Actions.php rename to koward/lib/Koward/Form/Actions.php diff --git a/koward/lib/Form/Object.php b/koward/lib/Koward/Form/Object.php similarity index 100% rename from koward/lib/Form/Object.php rename to koward/lib/Koward/Form/Object.php diff --git a/koward/lib/Form/Search.php b/koward/lib/Koward/Form/Search.php similarity index 100% rename from koward/lib/Form/Search.php rename to koward/lib/Koward/Form/Search.php diff --git a/koward/lib/Test.php b/koward/lib/Koward/Test.php similarity index 100% rename from koward/lib/Test.php rename to koward/lib/Koward/Test.php diff --git a/koward/lib/Test/AllTests.php b/koward/lib/Koward/Test/AllTests.php similarity index 100% rename from koward/lib/Test/AllTests.php rename to koward/lib/Koward/Test/AllTests.php diff --git a/koward/lib/Test/Renderer.php b/koward/lib/Koward/Test/Renderer.php similarity index 100% rename from koward/lib/Test/Renderer.php rename to koward/lib/Koward/Test/Renderer.php diff --git a/koward/lib/Test/Server/UserTest.php b/koward/lib/Koward/Test/Server/UserTest.php similarity index 100% rename from koward/lib/Test/Server/UserTest.php rename to koward/lib/Koward/Test/Server/UserTest.php diff --git a/koward/lib/Test/Template/scenario.html.dist b/koward/lib/Koward/Test/Template/scenario.html.dist similarity index 100% rename from koward/lib/Test/Template/scenario.html.dist rename to koward/lib/Koward/Test/Template/scenario.html.dist diff --git a/koward/lib/Test/Template/scenario_header.html.dist b/koward/lib/Koward/Test/Template/scenario_header.html.dist similarity index 100% rename from koward/lib/Test/Template/scenario_header.html.dist rename to koward/lib/Koward/Test/Template/scenario_header.html.dist diff --git a/koward/lib/Test/Template/scenarios.html.dist b/koward/lib/Koward/Test/Template/scenarios.html.dist similarity index 100% rename from koward/lib/Test/Template/scenarios.html.dist rename to koward/lib/Koward/Test/Template/scenarios.html.dist diff --git a/koward/lib/Test/Template/step.html.dist b/koward/lib/Koward/Test/Template/step.html.dist similarity index 100% rename from koward/lib/Test/Template/step.html.dist rename to koward/lib/Koward/Test/Template/step.html.dist diff --git a/koward/app/views/Check/run.html.php b/koward/lib/Koward/View/Check/run.html.php similarity index 100% rename from koward/app/views/Check/run.html.php rename to koward/lib/Koward/View/Check/run.html.php diff --git a/koward/app/views/Check/show.html.php b/koward/lib/Koward/View/Check/show.html.php similarity index 100% rename from koward/app/views/Check/show.html.php rename to koward/lib/Koward/View/Check/show.html.php diff --git a/koward/app/views/Index/index.html.php b/koward/lib/Koward/View/Index/index.html.php similarity index 100% rename from koward/app/views/Index/index.html.php rename to koward/lib/Koward/View/Index/index.html.php diff --git a/koward/app/views/Modify/add.html.php b/koward/lib/Koward/View/Modify/add.html.php similarity index 100% rename from koward/app/views/Modify/add.html.php rename to koward/lib/Koward/View/Modify/add.html.php diff --git a/koward/app/views/Object/delete.html.php b/koward/lib/Koward/View/Object/delete.html.php similarity index 100% rename from koward/app/views/Object/delete.html.php rename to koward/lib/Koward/View/Object/delete.html.php diff --git a/koward/app/views/Object/edit.html.php b/koward/lib/Koward/View/Object/edit.html.php similarity index 100% rename from koward/app/views/Object/edit.html.php rename to koward/lib/Koward/View/Object/edit.html.php diff --git a/koward/app/views/Object/listall.html.php b/koward/lib/Koward/View/Object/listall.html.php similarity index 100% rename from koward/app/views/Object/listall.html.php rename to koward/lib/Koward/View/Object/listall.html.php diff --git a/koward/app/views/Object/search.html.php b/koward/lib/Koward/View/Object/search.html.php similarity index 100% rename from koward/app/views/Object/search.html.php rename to koward/lib/Koward/View/Object/search.html.php diff --git a/koward/app/views/Object/view.html.php b/koward/lib/Koward/View/Object/view.html.php similarity index 100% rename from koward/app/views/Object/view.html.php rename to koward/lib/Koward/View/Object/view.html.php diff --git a/koward/app/views/shared/_header.html.php b/koward/lib/Koward/View/shared/_header.html.php similarity index 100% rename from koward/app/views/shared/_header.html.php rename to koward/lib/Koward/View/shared/_header.html.php diff --git a/koward/app/views/shared/_menu.html.php b/koward/lib/Koward/View/shared/_menu.html.php similarity index 100% rename from koward/app/views/shared/_menu.html.php rename to koward/lib/Koward/View/shared/_menu.html.php -- 2.11.0