Created
October 9, 2015 07:23
-
-
Save PEMapModder/1cbf9bfd64faceb4271e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class WithSubcommands extends Command{ | |
| public function __construct(Server $server){ | |
| parent::__construct(blah, blah, blah); | |
| $this->map = new MySimpleCommandMap($server); | |
| } | |
| public function execute(CommandSender $sender, $label, $args){ | |
| $this->map->dispatch($sender, implode(" ", $args)); | |
| } | |
| } | |
| class MySimpleCommandMap{ | |
| public function __construct(Server $server){ | |
| $this->server = $server; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment