Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Protected Member Functions
Zend_Translate_Adapter_Ini Class Reference
Inheritance diagram for Zend_Translate_Adapter_Ini:
Zend_Translate_Adapter

Public Member Functions

 toString ()
 
- Public Member Functions inherited from Zend_Translate_Adapter
 __construct ($options=array())
 
 addTranslation ($options=array())
 
 setOptions (array $options=array())
 
 getOptions ($optionKey=null)
 
 getLocale ()
 
 setLocale ($locale)
 
 getList ()
 
 getMessageId ($message, $locale=null)
 
 getMessageIds ($locale=null)
 
 getMessages ($locale=null)
 
 isAvailable ($locale)
 
 translate ($messageId, $locale=null)
 
 plural ($singular, $plural, $number, $locale=null)
 
 _ ($messageId, $locale=null)
 
 isTranslated ($messageId, $original=false, $locale=null)
 
 toString ()
 

Protected Member Functions

 _loadTranslationData ($data, $locale, array $options=array())
 
- Protected Member Functions inherited from Zend_Translate_Adapter
 _loadTranslationData ($data, $locale, array $options=array())
 
 _log ($message, $locale)
 

Additional Inherited Members

- Static Public Member Functions inherited from Zend_Translate_Adapter
static getCache ()
 
static setCache (Zend_Cache_Core $cache)
 
static hasCache ()
 
static removeCache ()
 
static clearCache ($tag=null)
 
- Data Fields inherited from Zend_Translate_Adapter
const LOCALE_DIRECTORY = 'directory'
 
const LOCALE_FILENAME = 'filename'
 
- Protected Attributes inherited from Zend_Translate_Adapter
 $_options
 
 $_translate = array()
 
- Static Protected Attributes inherited from Zend_Translate_Adapter
static $_cache = null
 

Detailed Description

Definition at line 34 of file Ini.php.

Member Function Documentation

◆ _loadTranslationData()

_loadTranslationData (   $data,
  $locale,
array  $options = array() 
)
protected

Load translation data

Parameters
string | array$data
string$localeLocale/Language to add data for, identical with locale identifier, see Zend_Locale for more information
array$optionsOPTIONAL Options to use
Exceptions
Zend_Translate_ExceptionIni file not found
Returns
array

Definition at line 48 of file Ini.php.

49  {
50  $this->_data = array();
51  if (!file_exists($data)) {
52  #require_once 'Zend/Translate/Exception.php';
53  throw new Zend_Translate_Exception("Ini file '".$data."' not found");
54  }
55 
56  $inidata = parse_ini_file($data, false);
57  if (!isset($this->_data[$locale])) {
58  $this->_data[$locale] = array();
59  }
60 
61  $this->_data[$locale] = array_merge($this->_data[$locale], $inidata);
62  return $this->_data;
63  }

◆ toString()

toString ( )

returns the adapters name

Returns
string

Definition at line 70 of file Ini.php.

71  {
72  return "Ini";
73  }

The documentation for this class was generated from the following file: