Skip to content
QuestionNotExist.php 674 B
Newer Older
<?php

/**
 * Class QuestionNotExist
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 QuestionNotExist extends \RuntimeException
{
Michael Jansen's avatar
Michael Jansen committed
    /**
     * @var int
     */
    protected $question_index;
Michael Jansen's avatar
Michael Jansen committed
    /**
     * @param int $question_index
     */
    public function __construct($question_index)
    {
        $this->question_index = $question_index;
Michael Jansen's avatar
Michael Jansen committed
        parent::__construct(
            sprintf('The Question with index "Q%s" does not exist "', $this->question_index)
        );
    }
Michael Jansen's avatar
Michael Jansen committed
    /**
     * @return int
     */
    public function getQuestionIndex()
    {
        return $this->question_index;
    }
}