public function fromRoman($roman)
    {
        $number = 0;
        foreach ($this->getRomanExceptions() as $withThis => $replaceThis) {
            $roman = str_replace($replaceThis, $withThis, $roman);
        }
        foreach ($this->getRomanValues() as $romanValue => $numberValue) {
            $number += $numberValue * substr_count($roman, $romanValue);
        }
        return $number;
    }