예제 #1
0
 /**
  * @param $locale
  * @param $format
  *
  * @return array|string
  */
 protected function makeDownloadRequest($locale, $format, $tag)
 {
     if (array_key_exists($locale, $this->tagCache) && array_key_exists($tag, $this->tagCache[$locale])) {
         return $this->tagCache[$locale][$tag];
     }
     $response = $this->client->request('locale.download', ['project_id' => $this->projectId, 'id' => $locale, 'file_format' => $format, 'tag' => $tag]);
     $content = $response['text']->getContents();
     $this->tagCache[$locale][$tag] = $content;
     return $content;
 }
예제 #2
0
 /**
  * @param $locale
  * @param $format
  *
  * @return array|string
  */
 protected function makeDownloadRequest($locale, $format, $tag)
 {
     $response = $this->client->request('locale.download', ['project_id' => $this->projectId, 'id' => $locale, 'file_format' => $format, 'tag' => $tag]);
     return $response['text']->getContents();
 }