X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fclasses%2Fmain%2Fcontroller%2Fclass_BaseController.php;h=1c4d442f5aca51619ce255e8394867e3d39e1185;hb=2230a2e7e09b6b47fe3d68181a28a4435c1732e6;hp=4438cc216e60f0d61f44da6ed10b1928b31028c8;hpb=0e9b4c76519b80ed1369936f56a68cea65aff56d;p=mailer.git diff --git a/inc/classes/main/controller/class_BaseController.php b/inc/classes/main/controller/class_BaseController.php index 4438cc216e..1c4d442f5a 100644 --- a/inc/classes/main/controller/class_BaseController.php +++ b/inc/classes/main/controller/class_BaseController.php @@ -6,7 +6,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software + * @copyright Copyright (c) 2007, 2008 Roland Haeder, this is free software * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * @@ -23,12 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class BaseController extends BaseFrameworkSystem { - /** - * Instance of a CommandResolver class - */ - private $resolverInstance = null; - +class BaseController extends BaseFrameworkSystem implements Registerable { /** * Pre filter chain instance */ @@ -42,11 +37,12 @@ class BaseController extends BaseFrameworkSystem { /** * Protected constructor * + * @param $className Name of the class * @return void */ - protected function __construct ($class) { + protected function __construct ($className) { // Call parent constructor - parent::__construct($class); + parent::__construct($className); // Clean up a little $this->removeNumberFormaters(); @@ -55,25 +51,9 @@ class BaseController extends BaseFrameworkSystem { // Initialize both filter chains $this->preFilterChain = ObjectFactory::createObjectByConfiguredName('filter_chain_class'); $this->postFilterChain = ObjectFactory::createObjectByConfiguredName('filter_chain_class'); - } - /** - * Getter for a command resolver instance - * - * @return $resolverInstance An instance of a command resolver class - */ - public final function getResolverInstance () { - return $this->resolverInstance; - } - - /** - * Setter for a command resolver instance - * - * @param $resolverInstance An instance of a command resolver class - * @return void - */ - public final function setResolverInstance (CommandResolver $resolverInstance) { - $this->resolverInstance = $resolverInstance; + // Add this controller to the registry + Registry::getRegistry()->addInstance('controller', $this); } /**