protected function dtoToArray(BaseDto $dto)
    {
        $itemData = [];

        foreach ($this->scheme as $fieldName => $fieldInfo) {
            $getter = 'get' . ucfirst($fieldName);

            if (!method_exists($dto, $getter)) {
                throw new RuntimeException("Undefined method '$getter' in " . get_class($dto));
            }

            /** @var FormatterInterface $formatter */
            $formatter = $this->formatterPluginManager->get($fieldInfo['formatter']);

            $itemData[$fieldName] = $formatter->format($dto->$getter());
        }

        return $itemData;
    }