| Package | com.cmiscm.mvc |
| Class | public class Controller |
| Inheritance | Controller Object |
See also
| Property | Defined By | ||
|---|---|---|---|
| getInstance : Controller [static] [read-only] | Controller | ||
| Method | Defined By | ||
|---|---|---|---|
| Controller | |||
addCommand($name:String, $command:IController):void
Add Command
| Controller | ||
getCommand($name:String):IController
Get Command
return null in case not find Command
| Controller | ||
removeCommand($name:String):void
Remove Command
| Controller | ||
| getInstance | property |
getInstance:Controller [read-only] public static function get getInstance():Controller| Controller | () | Constructor |
public function Controller()| addCommand | () | method |
public function addCommand($name:String, $command:IController):voidAdd Command
Parameters
$name:String — Command Name
| |
$command:IController — Command implements IController
|
| getCommand | () | method |
public function getCommand($name:String):IControllerGet Command
return null in case not find Command
Parameters
$name:String — Command Name
|
IController —
|
| removeCommand | () | method |
public function removeCommand($name:String):voidRemove Command
Parameters
$name:String — Command Name
|
// Add Command
Controller.getInstance.addCommand(MenuCommand.NAME, new MenuCommand());
// Get Command
var menu:MenuCommand = Controller.getInstance.getCommand(MenuCommand.NAME) as MenuCommand;
// Remove Command
Controller.getInstance.removeCommand(MenuCommand.NAME);