PhpSlackBot\Command\PokerPlanningCommand::start PHP Method

start() private method

private start ( $args )
    private function start($args)
    {
        if ($this->status == 'free') {
            $this->subject = isset($args[2]) ? $args[2] : null;
            if (!is_null($this->subject)) {
                $this->subject = str_replace(array('<', '>'), '', $this->subject);
            }
            $this->status = 'running';
            $this->initiator = $this->getCurrentUser();
            $this->scores = array();
            $this->send($this->getCurrentChannel(), null, 'Poker planning sessions start by ' . $this->getUserNameFromUserId($this->initiator) . "\n" . 'Please vote' . (!is_null($this->subject) ? ' for ' . $this->subject : ''));
            $this->send($this->getCurrentChannel(), $this->getCurrentUser(), 'Use "' . $this->getName() . ' end" to end the session');
        } else {
            $this->send($this->getCurrentChannel(), $this->getCurrentUser(), 'A poker session is still active');
        }
    }