public function setVector($vector)
    {
        if (empty($vector)) {
            throw new \InvalidArgumentException(sprintf('Cvss vector "%s" is not valid.', $vector));
        }

        if (!preg_match('/^' . self::$vectorHead . '.*/mi', $vector)) {
            throw new \InvalidArgumentException((sprintf('Cvss vector "%s" is not valid. Must start with "%s"', $vector, self::$vectorHead)));
        }

        $this->vectorInputs = self::parseVector($vector);

        $resolver = $this->getInputLevelConfiguration();
        $this->vectorLevels = $resolver->resolve($this->vectorInputs);

        $this->calculate();
    }