public function setCustomValues($customValues)
    {
        if (!is_array($customValues) && !($customValues instanceof \Traversable)) {
            throw new \InvalidArgumentException('You should pass an array or a collection of key-value pairs');
        }

        $this->customValues = array();

        foreach ($customValues as $element => $value) {
            $this->addCustomValue($element, $value);
        }

        return $this;
    }