Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Array.php
Go to the documentation of this file.
1 <?php
24 #require_once 'Zend/Locale.php';
25 
27 #require_once 'Zend/Translate/Adapter.php';
28 
29 
37 {
38  private $_data = array();
39 
49  protected function _loadTranslationData($data, $locale, array $options = array())
50  {
51  $this->_data = array();
52  if (!is_array($data)) {
53  if (file_exists($data)) {
54  ob_start();
55  $data = include($data);
56  ob_end_clean();
57  }
58  }
59  if (!is_array($data)) {
60  #require_once 'Zend/Translate/Exception.php';
61  throw new Zend_Translate_Exception("Error including array or file '".$data."'");
62  }
63 
64  if (!isset($this->_data[$locale])) {
65  $this->_data[$locale] = array();
66  }
67 
68  $this->_data[$locale] = $data + $this->_data[$locale];
69  return $this->_data;
70  }
71 
77  public function toString()
78  {
79  return "Array";
80  }
81 }
_loadTranslationData($data, $locale, array $options=array())
Definition: Array.php:49