Skip to content
DuplicateElement.php 613 B
Newer Older
<?php

/**
 * Class DuplicateElement
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 DuplicateElement extends \RuntimeException
{
Michael Jansen's avatar
Michael Jansen committed
    /**
     * @var string
     */
    protected $element;
Michael Jansen's avatar
Michael Jansen committed
    /**
     * @param string $bracket
     */
    public function __construct($element)
    {
        $this->element = $element;
Michael Jansen's avatar
Michael Jansen committed
        parent::__construct(
            sprintf('Duplicate key "%s" in condition', $this->element)
        );
    }
Michael Jansen's avatar
Michael Jansen committed
    /**
     * @return string
     */
    public function getElement()
    {
        return $this->element;
    }
}