<?php

namespace ModulesGarden\ProxmoxAddon\Core\SL;

use ModulesGarden\ProxmoxAddon\Core\ModuleConstants;

/**
 * Description of Register
 *
 * @author Rafał Ossowski <rafal.os@modulesgarden.com>
 */
class Rewrite extends AbstractReaderYml
{

    protected function load()
    {
        $dataDev = $this->readYml(ModuleConstants::getFullPath('app', 'Config', 'di', 'rewrite.yml'));
        $data    = [];
        if (isset($dataDev) && isset($dataDev['class']))
        {
            foreach ($dataDev['class'] as $class)
            {
                $data[$class['old']] = $class['new'];
            }
        }
        $this->data = $data;
    }
}
