/** * @param string $expression * @param int $question_index */ public function __construct($expression, $question_index) { $this->expression = $expression; $this->question_index = $question_index; if ($this->getQuestionIndex() === null) { $msg = sprintf('The expression "%s" is not supported by the current question', $this->getExpression()); } else { $msg = sprintf('The expression "%s" is not supported by the question with index "Q%s"', $this->getExpression(), $this->getQuestionIndex()); } parent::__construct($msg); }
/** * @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; if ($this->getQuestionIndex() === null) { $msg = sprintf('The Current Question does not have an answer with the index "%s"', $this->getAnswerIndex()); } else { $msg = sprintf('The Question with index "Q%s" does not have an answer with the index "%s" ', $this->getQuestionIndex(), $this->getAnswerIndex()); } parent::__construct($msg); }
/** * @param int $question_index * @param string $value * @param int $answer_index */ public function __construct($question_index, $value, $answer_index = null) { $this->question_index = $question_index; $this->answer_index = $answer_index; $this->value = $value; if ($this->getQuestionIndex() === null && $this->getAnswerIndex() === null) { $msg = sprintf('The value "%s" does not exist for the current question', $value); } elseif ($this->getQuestionIndex() === null) { $msg = sprintf('The value "%s" does not exist for the answer with index "%s" of the current question', $value, $this->getAnswerIndex()); } elseif ($this->getAnswerIndex() === null) { $msg = sprintf('The value "%s" does not exist for the question Q%s', $value, $this->getQuestionIndex()); } else { $msg = sprintf('The value "%s" does not exist for the question Q%s[%s]', $value, $this->getQuestionIndex(), $this->getAnswerIndex()); } parent::__construct($msg); }
/** * @param string $expression */ public function __construct($expression) { $this->expression = $expression; parent::__construct(sprintf('The expression "%s" is not supported', $this->getExpression())); }
/** * @param int $question_index */ public function __construct($question_index) { $this->question_index = $question_index; parent::__construct(sprintf('The Question with index "Q%s" is not reachable from this node', $this->getQuestionIndex())); }
/** * @param string $bracket */ public function __construct($element) { $this->element = $element; parent::__construct(sprintf('Duplicate key "%s" in condition', $this->getElement())); }
/** * @param int $question_index */ public function __construct($question_index) { $this->question_index = $question_index; parent::__construct(sprintf('The Question with index "Q%s" does not exist', $this->getQuestionIndex())); }
/** * @param string $operator */ public function __construct($operator) { $this->operator = $operator; parent::__construct(sprintf('The operator "%s" is not supported', $this->getOperator())); }
/** * @param string $bracket */ public function __construct($bracket) { $this->bracket = $bracket; parent::__construct(sprintf('There is a bracket "%s" missing in the condition', $this->getBracket())); }
/** * @param int $column */ public function __construct($column) { $this->column = $column; parent::__construct(sprintf('The expression at position "%s" is not valid', $this->getColumn())); }
/** * @param string $expression * @param string $operator */ public function __construct($expression, $operator) { $this->expression = $expression; $this->operator = $operator; parent::__construct(sprintf('The expression "%s" is not supported by the operator "%s"', $this->getExpression(), $this->getOperator())); }
/** * @param string $expression * @param int $question_index */ public function __construct($condition) { $this->condition = $condition; parent::__construct(sprintf('The parser is unable to parse the condition "%s"', $this->getCondition())); }