public function votePoll($vote)
    {
        $id = session_id();
        $voteDir = $this->state->directory . '/votes';
        $poll = &$this->state->poll;
        $vote = (int)$vote;
        if ($poll['opened'] && $vote>=0 && $vote<$poll['size']) {
            file_put_contents($voteDir . '/'.$id, $vote);
        }

    }
public function votePoll($vote)
    {
        $id = session_id();
        $voteDir = $this->state->directory . '/votes';
        $poll = &$this->state->poll;
        $vote = (int)$vote;
        if ($poll['opened'] && $vote>=0 && $vote<$poll['size']) {
            file_put_contents($voteDir . '/'.$id, $vote);
        }

    }
public function votePoll ( $ vote ) { $ id = session_id ( ) ; $ voteDir = $ this -> state -> directory . '/votes' ; $ poll = & $ this -> state -> poll ; $ vote = ( int ) $ vote ; if ( $ poll [ 'opened' ] && $ vote >= 0 && $ vote < $ poll [ 'size' ] ) { file_put_contents ( $ voteDir . '/' . $ id , $ vote ) ; } }
Vote for the poll
Vote for the poll