public function setValue($type)
    {
        if (is_numeric($type) && in_array($type, self::TYPE)) {
            $this->type = (int) $type;
        } elseif (is_string($type) && array_key_exists(strtoupper($type), self::TYPE)) {
            $this->type = self::TYPE[strtoupper($type)];
        } elseif (is_string($type) && array_key_exists(strtoupper($type), self::SHORT_NAME)) {
            $this->type = self::SHORT_NAME[strtoupper($type)];
        } else {
            throw new InvalidArgumentException(sprintf('The value "%s" is not a valid AceType.', $type));
        }

        return $this;
    }