public function getByName(string $name) { foreach ($this->items as $conversion) { if ($conversion->getName() === $name) { return $conversion; } } throw InvalidConversion::unknownName($name); }