Skip to content
AnswerIndexNotExist.php 1004 B
Newer Older
<?php

/**
 * Class AnswerIndexNotExist
Michael Jansen's avatar
Michael Jansen committed
 * @package
 *
 * Date: 25.03.13
 * Time: 15:15
 * @author Thomas Joußen <tjoussen@databay.de>
Michael Jansen's avatar
Michael Jansen committed
 */
class AnswerIndexNotExist extends \RuntimeException
{
Michael Jansen's avatar
Michael Jansen committed
    /**
     * @var int
     */
    protected $question_index;
Michael Jansen's avatar
Michael Jansen committed
    /**
     * @var int
     */
    protected $answer_index;
Michael Jansen's avatar
Michael Jansen committed
    /**
     * @param int $question_index
     * @param int $answer_index
     */
    public function __construct($question_index, $answer_index)
    {
        $this->question_index = $question_index;
        $this->answer_index = $answer_index;
Michael Jansen's avatar
Michael Jansen committed
        parent::__construct(
            sprintf('The Question with index "Q%s" does not have an answer with the index "%s" ', $this->question_index, $this->answer_index)
        );
    }
Michael Jansen's avatar
Michael Jansen committed
    /**
     * @return int
     */
    public function getQuestionIndex()
    {
        return $this->question_index;
    }
Michael Jansen's avatar
Michael Jansen committed
    /**
     * @return int
     */
    public function getAnswerIndex()
    {
        return $this->answer_index;
    }
}