Actions (so called sub-commands) may now have own pre/post filter, profile update...
[shipsimu.git] / inc / classes / main / controller / class_BaseController.php
index 4438cc216e60f0d61f44da6ed10b1928b31028c8..b2951f51e75fa7395297d14bff2963b5ea02c8d3 100644 (file)
  * 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
         */
@@ -55,25 +50,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);
        }
 
        /**