Skip to content
OperatorNotSupportedByExpression.php 969 B
Newer Older
<?php

/**
 * Class OperatorNotSupportedByExpression
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 OperatorNotSupportedByExpression extends \RuntimeException
{
Michael Jansen's avatar
Michael Jansen committed
    /**
     * @var string
     */
    protected $operator;
Michael Jansen's avatar
Michael Jansen committed
    /**
     * @var string
     */
    protected $expression;
Michael Jansen's avatar
Michael Jansen committed
    /**
     * @param string $expression
     * @param string $operator
     */
    public function __construct($expression, $operator)
    {
        $this->expression = $expression;
        $this->operator = $operator;
Michael Jansen's avatar
Michael Jansen committed
        parent::__construct(
            sprintf('The expression "%s" is not supported by the operator "%s"', $this->expression, $this->operator)
        );
    }
Michael Jansen's avatar
Michael Jansen committed
    /**
     * @return string
     */
    public function getExpression()
    {
        return $this->expression;
    }
Michael Jansen's avatar
Michael Jansen committed
    /**
     * @return string
     */
    public function getOperator()
    {
        return $this->operator;
    }
}