original_string: public function getTransliterationMap($path, $alphabet)
      {
          // Valdate
          if (!in_array($alphabet, array(Settings::ALPHABET_CYR, Settings::ALPHABET_LAT))) {
              throw new \InvalidArgumentException(sprintf('Alphabet "%s" is not recognized.', $alphabet));
          }
  
          // Load form cache
          $map = $this->loadFromCache($path, $alphabet);
          if (null !== $map) {
              return $map;
          }
  
          // Load from file
          $map = $this->loadFromFile($path);
  
          // Store to cache
          $this->storeToCache($path, $map);
  
          return $this->loadFromCache($path, $alphabet);
      }
code: public function getTransliterationMap($path, $alphabet)
      {
          // Valdate
          if (!in_array($alphabet, array(Settings::ALPHABET_CYR, Settings::ALPHABET_LAT))) {
              throw new \InvalidArgumentException(sprintf('Alphabet "%s" is not recognized.', $alphabet));
          }
  
          // Load form cache
          $map = $this->loadFromCache($path, $alphabet);
          if (null !== $map) {
              return $map;
          }
  
          // Load from file
          $map = $this->loadFromFile($path);
  
          // Store to cache
          $this->storeToCache($path, $map);
  
          return $this->loadFromCache($path, $alphabet);
      }
code_tokens: public function getTransliterationMap ( $ path , $ alphabet ) { // Valdate if ( ! in_array ( $ alphabet , array ( Settings :: ALPHABET_CYR , Settings :: ALPHABET_LAT ) ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Alphabet "%s" is not recognized.' , $ alphabet ) ) ; } // Load form cache $ map = $ this -> loadFromCache ( $ path , $ alphabet ) ; if ( null !== $ map ) { return $ map ; } // Load from file $ map = $ this -> loadFromFile ( $ path ) ; // Store to cache $ this -> storeToCache ( $ path , $ map ) ; return $ this -> loadFromCache ( $ path , $ alphabet ) ; }
docstring: Get transliteration map.
  
  @param  string $path     path to map file
  @param  string $alphabet
  @return array  map array
docstring_tokens: Get transliteration map .