protected function loadFromFile($path)
    {
        if (!file_exists($path)) {
            throw new \Exception(sprintf('Map file "%s" does not exist.', $path));
        }

        $map = require($path);
        if (!is_array($map)
            || !is_array($map[Settings::ALPHABET_CYR])
            || !is_array($map[Settings::ALPHABET_LAT])
        ) {
            throw new \Exception(sprintf(
                'Map file "%s" is not valid, should return an array with %s and %s subarrays.',
                $path,
                Settings::ALPHABET_CYR,
                Settings::ALPHABET_LAT
            ));
        }

        return $map;
    }
protected function loadFromFile($path)
    {
        if (!file_exists($path)) {
            throw new \Exception(sprintf('Map file "%s" does not exist.', $path));
        }

        $map = require($path);
        if (!is_array($map)
            || !is_array($map[Settings::ALPHABET_CYR])
            || !is_array($map[Settings::ALPHABET_LAT])
        ) {
            throw new \Exception(sprintf(
                'Map file "%s" is not valid, should return an array with %s and %s subarrays.',
                $path,
                Settings::ALPHABET_CYR,
                Settings::ALPHABET_LAT
            ));
        }

        return $map;
    }
protected function loadFromFile ( $ path ) { if ( ! file_exists ( $ path ) ) { throw new \ Exception ( sprintf ( 'Map file "%s" does not exist.' , $ path ) ) ; } $ map = require ( $ path ) ; if ( ! is_array ( $ map ) || ! is_array ( $ map [ Settings :: ALPHABET_CYR ] ) || ! is_array ( $ map [ Settings :: ALPHABET_LAT ] ) ) { throw new \ Exception ( sprintf ( 'Map file "%s" is not valid, should return an array with %s and %s subarrays.' , $ path , Settings :: ALPHABET_CYR , Settings :: ALPHABET_LAT ) ) ; } return $ map ; }
Load map from file.

@param  string $path path to map file
@return array  map array
Load map from file .