Exemplo n.º 1
0
 public function getFactory($name)
 {
     if (isset($this->factories[$name])) {
         return $this->factories[$name];
     }
     return $this->factories[$name] = APICommandFactory::create($name);
 }
 public function getCommand($name, array $args = [], array $options = [])
 {
     switch ($name) {
         case 'viewprofile':
             return new ViewProfileCommand($this->getName(), 'view_profile', $args, $options);
         case 'find':
             return new FindCommand($this->getName(), 'find', $args, $options);
     }
     return parent::getCommand($name, $args, $options);
 }
 public function getCommand($name, array $args = [], array $options = [])
 {
     switch ($name) {
         case 'fetch':
             return new FetchCommand($this->getName(), 'fetch', $args, $options);
         case 'solve':
             return new SolveCommand($this->getName(), 'solve', $args, $options);
     }
     return parent::getCommand($name, $args, $options);
 }
 public function getCommand($name, array $args = [], array $options = [])
 {
     switch ($name) {
         case 'build':
             return new BuildCommand($this->getName(), 'build', $args, $options);
         case 'view':
             return new ViewCommand($this->getName(), 'view', $args, $options);
         case 'upgrade':
             return new UpgradeCommand($this->getName(), 'upgrade', $args, $options);
         case 'demolish':
             return new DemolishCommand($this->getName(), 'demolish', $args, $options);
         case 'downgrade':
             return new DowngradeCommand($this->getName(), 'downgrade', $args, $options);
         case 'getstatsforlevel':
             return new GetStatsForLevelCommand($this->getName(), 'get_stats_for_level', $args, $options);
         case 'repair':
             return new RepairCommand($this->getName(), 'repair', $args, $options);
     }
     return parent::getCommand($name, $args, $options);
 }
Exemplo n.º 5
0
 public function getCommand($name, array $args = [], array $options = [])
 {
     switch ($name) {
         case 'getstatus':
             return new GetStatusCommand($this->getName(), 'get_status', $args, $options);
         case 'getbuildings':
             return new GetBuildingsCommand($this->getName(), 'get_buildings', $args, $options);
         case 'repairlist':
             return new RepairListCommand($this->getName(), 'repair_list', $args, $options);
         case 'rearrangebuildings':
             return new RearrangeBuildingsCommand($this->getName(), 'rearrange_buildings', $args, $options);
         case 'getbuildable':
             return new GetBuildableCommand($this->getName(), 'get_buildable', $args, $options);
         case 'rename':
             return new RenameCommand($this->getName(), 'rename', $args, $options);
         case 'abandon':
             return new AbandonCommand($this->getName(), 'abandon', $args, $options);
         case 'viewlaws':
             return new ViewLawsCommand($this->getName(), 'view_laws', $args, $options);
     }
     return parent::getCommand($name, $args, $options);
 }
Exemplo n.º 6
0
 public function getCommand($name, array $args = [], array $options = [])
 {
     switch ($name) {
         case 'getstarmap':
             return new GetStarMapCommand($this->getName(), 'get_star_map', $args, $options);
         case 'getstars':
             return new GetStarsCommand($this->getName(), 'get_stars', $args, $options);
         case 'checkstarforincomingprobe':
             return new CheckStarForIncomingProbeCommand($this->getName(), 'check_star_for_incoming_probe', $args, $options);
         case 'getstar':
             return new GetStarCommand($this->getName(), 'get_star', $args, $options);
         case 'getstarbyname':
             return new GetStarByNameCommand($this->getName(), 'get_star_by_name', $args, $options);
         case 'getstarbyxy':
             return new GetStarByXYCommand($this->getName(), 'get_star_by_xy', $args, $options);
         case 'searchstars':
             return new SearchStarsCommand($this->getName(), 'search_stars', $args, $options);
         case 'probesummaryfissures':
             return new ProbeSummaryFissuresCommand($this->getName(), 'probe_summary_fissures', $args, $options);
     }
     return parent::getCommand($name, $args, $options);
 }
Exemplo n.º 7
0
 public function getCommand($name, array $args = [], array $options = [])
 {
     switch ($name) {
         case 'credits':
             return new CreditsCommand($this->getName(), 'view_inbox', $args, $options);
         case 'alliancerank':
             return new AllianceRankCommand($this->getName(), 'alliance_rank', $args, $options);
         case 'findalliancerank':
             return new FindAllianceRankCommand($this->getName(), 'find_alliance_rank', $args, $options);
         case 'empirerank':
             return new EmpireRankCommand($this->getName(), 'find_empire_rank', $args, $options);
         case 'findempirerank':
             return new FindEmpireRankCommand($this->getName(), 'find_empire_rank', $args, $options);
         case 'colonyrank':
             return new ColonyRankCommand($this->getName(), 'colony_rank', $args, $options);
         case 'spyrank':
             return new SpyRankCommand($this->getName(), 'spy_rank', $args, $options);
         case 'weeklymedalwinners':
             return new WeeklyMedalWinnersCommand($this->getName(), 'weekly_medal_winners', $args, $options);
     }
     return parent::getCommand($name, $args, $options);
 }
Exemplo n.º 8
0
 public function getCommand($name, array $args = [], array $options = [])
 {
     switch ($name) {
         case 'viewinbox':
             return new ViewInboxCommand($this->getName(), 'view_inbox', $args, $options);
         case 'viewarchived':
             return new ViewArchivedCommand($this->getName(), 'view_archived', $args, $options);
         case 'viewtrashed':
             return new ViewTrashedCommand($this->getName(), 'view_trashed', $args, $options);
         case 'viewsent':
             return new ViewSentCommand($this->getName(), 'view_sent', $args, $options);
         case 'readmessage':
             return new ReadMessageCommand($this->getName(), 'read_message', $args, $options);
         case 'archivemessages':
             return new ArchiveMessagesCommand($this->getName(), 'archive_messages', $args, $options);
         case 'trashmessages':
             return new TrashMessagesCommand($this->getName(), 'trash_messages', $args, $options);
         case 'sendmessage':
             return new SendMessageCommand($this->getName(), 'send_message', $args, $options);
     }
     return parent::getCommand($name, $args, $options);
 }
Exemplo n.º 9
0
 public function getCommand($name, array $args = [], array $options = [])
 {
     switch ($name) {
         case 'isnameavailable':
             return new IsNameAvailableCommand($this->getName(), 'is_name_available', $args, $options);
         case 'logout':
             return new LogoutCommand($this->getName(), 'logout', $args, $options);
         case 'login':
             return new LoginCommand($this->getName(), 'login', $args, $options);
         case 'fetchcaptcha':
             return new FetchCaptchaCommand($this->getName(), 'fetch_captcha', $args, $options);
             //	case 'create':
             //		return new CreateCommand($this->getName(), 'create', $args, $options);
             //	case 'found':
             //		return new FoundCommand($this->getName(), 'found', $args, $options);
         //	case 'create':
         //		return new CreateCommand($this->getName(), 'create', $args, $options);
         //	case 'found':
         //		return new FoundCommand($this->getName(), 'found', $args, $options);
         case 'getinvitefriendurl':
             return new GetInviteFriendURLCommand($this->getName(), 'get_invite_friend_url', $args, $options);
         case 'invitefriend':
             return new InviteFriendCommand($this->getName(), 'invite_friend', $args, $options);
         case 'getstatus':
             return new GetStatusCommand($this->getName(), 'get_status', $args, $options);
         case 'viewprofile':
             return new ViewProfileCommand($this->getName(), 'view_profile', $args, $options);
         case 'editprofile':
             return new EditProfileCommand($this->getName(), 'edit_profile', $args, $options);
         case 'viewpublicprofile':
             return new ViewPublicProfileCommand($this->getName(), 'view_public_profile', $args, $options);
         case 'sendpasswordresetmessage':
             return new SendPasswordResetMessageCommand($this->getName(), 'send_password_reset_message', $args, $options);
         case 'resetpassword':
             return new ResetPasswordCommand($this->getName(), 'reset_password', $args, $options);
         case 'changepassword':
             return new ChangePasswordCommand($this->getName(), 'change_password', $args, $options);
         case 'find':
             return new FindCommand($this->getName(), 'find', $args, $options);
         case 'setstatusmessage':
             return new SetStatusMessageCommand($this->getName(), 'set_status_message', $args, $options);
         case 'viewboosts':
             return new ViewBoostsCommand($this->getName(), 'view_boosts', $args, $options);
         case 'booststorage':
             return new BoostStorageCommand($this->getName(), 'boost_storage', $args, $options);
         case 'boostfood':
             return new BoostFoodCommand($this->getName(), 'boost_food', $args, $options);
         case 'boostwater':
             return new BoostWaterCommand($this->getName(), 'boost_water', $args, $options);
         case 'boostenergy':
             return new BoostEnergyCommand($this->getName(), 'boost_energy', $args, $options);
         case 'boostore':
             return new BoostOreCommand($this->getName(), 'boost_ore', $args, $options);
         case 'boosthappiness':
             return new BoostHappinessCommand($this->getName(), 'boost_happiness', $args, $options);
         case 'boostbuilding':
             return new BoostBuildingCommand($this->getName(), 'boost_building', $args, $options);
         case 'spytrainingboost':
             return new SpyTrainingBoostCommand($this->getName(), 'spy_training_boost', $args, $options);
         case 'enableselfdestruct':
             return new EnableSelfDestructCommand($this->getName(), 'enable_self_destruct', $args, $options);
         case 'disableselfdestruct':
             return new DisableSelfDestructCommand($this->getName(), 'disable_self_destruct', $args, $options);
         case 'redeemessentiacode':
             return new RedeemEssentiaCodeCommand($this->getName(), 'redeem_essentia_code', $args, $options);
             //	case 'updatespecies':
             //		return new UpdateSpeciesCommand($this->getName(), 'update_species', $args, $options);
         //	case 'updatespecies':
         //		return new UpdateSpeciesCommand($this->getName(), 'update_species', $args, $options);
         case 'redefinespecieslimits':
             return new RedefineSpeciesLimitsCommand($this->getName(), 'redefine_species_limits', $args, $options);
         case 'redefinespecies':
             return new RedefineSpeciesCommand($this->getName(), 'redefine_species', $args, $options);
         case 'viewspeciesstats':
             return new ViewSpeciesStatsCommand($this->getName(), 'view_species_stats', $args, $options);
         case 'getspeciestemplates':
             return new GetSpeciesTemplatesCommand($this->getName(), 'get_species_templates', $args, $options);
         case 'viewauthorizedsitters':
             return new ViewAuthorizedSittersCommand($this->getName(), 'view_authorized_sitters', $args, $options);
         case 'authorizesitters':
             return new AuthorizeSittersCommand($this->getName(), 'authorize_sitters', $args, $options);
         case 'deauthorizesitters':
             return new DeauthorizeSittersCommand($this->getName(), 'deauthorize_sitters', $args, $options);
     }
     return parent::getCommand($name, $args, $options);
 }