transport = $transport; } /** * Returns array of locales depends on fetching type. * * @param string $type locales fetching type * @return array of locale codes, for example: ['en_US', 'fr_FR'] */ public function getList($type = self::TYPE_ALL) { $url = $_ENV['app_frontend_url'] . self::URL . '?type=' . $type; $curl = $this->transport; $curl->write($url, [], CurlInterface::GET); $result = $curl->read(); $curl->close(); return explode('|', $result); } }