*
* @author Roland Haeder <webmaster@ship-simu.org>
* @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
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class BaseController extends BaseFrameworkSystem {
- /**
- * Instance of a CommandResolver class
- */
- private $resolverInstance = null;
-
+class BaseController extends BaseFrameworkSystem implements Registerable {
/**
* Pre filter chain instance
*/
/**
* 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();
// 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);
}
/**