private function normalizeValue($value)
    {
        switch ($this->type) {
            case self::TYPE_STRING:
                return trim((string)$value);
            case self::TYPE_INT:
                return intval($value);
            case self::TYPE_FLOAT:
                return floatval($value);
        }

        throw new FilterException("Invalid filter value type \"{$this->type}\"");
    }