AppStateESS/homestead

View on GitHub
class/Command/LotteryChooseFloorCommand.php

Summary

Maintainability
A
1 hr
Test Coverage
<?php

namespace Homestead\Command;

use \Homestead\CommandFactory;

class LotteryChooseFloorCommand extends Command {

    private $floorId;

    public function setFloorId($id){
        $this->floorId = $id;
    }

    public function getRequestVars()
    {
        return array('action'=>'LotteryChooseFloor', 'floorId'=>$this->floorId);
    }

    public function execute(CommandContext $context)
    {
        $roomCmd = CommandFactory::getCommand('LotteryShowChooseRoom');
        $roomCmd->setFloorId($context->get('floorId'));
        $roomCmd->redirect();
    }
}