Package | com.cmiscm.mvc |
Class | public class Controller |
Inheritance | Controller ![]() |
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):void
Add Command
Parameters
$name:String — Command Name
| |
$command:IController — Command implements IController
|
getCommand | () | method |
public function getCommand($name:String):IController
Get Command
return null in case not find Command
Parameters
$name:String — Command Name
|
IController —
|
removeCommand | () | method |
public function removeCommand($name:String):void
Remove 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);