Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Locales.php
Go to the documentation of this file.
1 <?php
7 
8 use Magento\Mtf\Util\Protocol\CurlInterface;
10 
14 class Locales
15 {
19  const TYPE_ALL = 'all';
20 
24  const TYPE_DEPLOYED = 'deployed';
25 
29  const URL = 'dev/tests/functional/utils/locales.php';
30 
36  private $transport;
37 
41  public function __construct(CurlTransport $transport)
42  {
43  $this->transport = $transport;
44  }
45 
52  public function getList($type = self::TYPE_ALL)
53  {
54  $url = $_ENV['app_frontend_url'] . self::URL . '?type=' . $type;
55  $curl = $this->transport;
56  $curl->write($url, [], CurlInterface::GET);
57  $result = $curl->read();
58  $curl->close();
59 
60  return explode('|', $result);
61  }
62 }
$type
Definition: item.phtml:13
getList($type=self::TYPE_ALL)
Definition: Locales.php:52
__construct(CurlTransport $transport)
Definition: Locales.php:41