src/Transliterator.php
private function getMap(): array
    {
        $map = $this->map ?? config('transliterate.default_map');
        $lang = $this->lang ?? config('transliterate.default_lang');
        $customMaps = config('transliterate.custom_maps');

        $vendorMapsPath = __DIR__.DIRECTORY_SEPARATOR.'maps'.DIRECTORY_SEPARATOR;
        $path = $customMaps[$lang][$map] ?? $vendorMapsPath.$lang.DIRECTORY_SEPARATOR.$map.'.php';

        if (!file_exists($path)) {
            throw new \InvalidArgumentException("The transliteration map '${path}' doesn't exist");
        }

        /* @noinspection PhpIncludeInspection */
        return require $path;
    }
private function getMap(): array
    {
        $map = $this->map ?? config('transliterate.default_map');
        $lang = $this->lang ?? config('transliterate.default_lang');
        $customMaps = config('transliterate.custom_maps');

        $vendorMapsPath = __DIR__.DIRECTORY_SEPARATOR.'maps'.DIRECTORY_SEPARATOR;
        $path = $customMaps[$lang][$map] ?? $vendorMapsPath.$lang.DIRECTORY_SEPARATOR.$map.'.php';

        if (!file_exists($path)) {
            throw new \InvalidArgumentException("The transliteration map '${path}' doesn't exist");
        }

        /* @noinspection PhpIncludeInspection */
        return require $path;
    }
private function getMap ( ) : array { $ map = $ this -> map ?? config ( 'transliterate.default_map' ) ; $ lang = $ this -> lang ?? config ( 'transliterate.default_lang' ) ; $ customMaps = config ( 'transliterate.custom_maps' ) ; $ vendorMapsPath = __DIR__ . DIRECTORY_SEPARATOR . 'maps' . DIRECTORY_SEPARATOR ; $ path = $ customMaps [ $ lang ] [ $ map ] ?? $ vendorMapsPath . $ lang . DIRECTORY_SEPARATOR . $ map . '.php' ; if ( ! file_exists ( $ path ) ) { throw new \ InvalidArgumentException ( "The transliteration map '${path}' doesn't exist" ) ; } /* @noinspection PhpIncludeInspection */ return require $ path ; }
Get map array according to config file.

@return array
Get map array according to config file .