Definition at line 36 of file Csv.php.
◆ __construct()
__construct |
( |
|
$options = array() | ) |
|
Generates the adapter
- Parameters
-
Definition at line 45 of file Csv.php.
47 $this->_options[
'delimiter'] =
";";
48 $this->_options[
'length'] = 0;
49 $this->_options[
'enclosure'] =
'"';
53 }
else if (func_num_args() > 1) {
54 $args = func_get_args();
56 $options[
'content'] = array_shift($args);
59 $options[
'locale'] = array_shift($args);
63 $opt = array_shift($args);
◆ _loadTranslationData()
_loadTranslationData |
( |
|
$filename, |
|
|
|
$locale, |
|
|
array |
$options = array() |
|
) |
| |
|
protected |
Load translation data
- Parameters
-
string | array | $filename | Filename and full path to the translation source |
string | $locale | Locale/Language to add data for, identical with locale identifier, see Zend_Locale for more information |
array | $option | OPTIONAL Options to use |
- Returns
- array
Definition at line 82 of file Csv.php.
84 $this->_data = array();
86 $this->_file = @
fopen($filename,
'rb');
88 #require_once 'Zend/Translate/Exception.php'; 92 while(($data = fgetcsv($this->_file, $options['length
'], $options['delimiter
'], $options['enclosure
'])) !== false) { 93 if (substr($data[0], 0, 1) === '#
') { 97 if (!isset($data[1])) { 101 if (count($data) == 2) { 102 $this->_data[$locale][$data[0]] = $data[1]; 104 $singular = array_shift($data); 105 $this->_data[$locale][$singular] = $data;
◆ toString()
returns the adapters name
- Returns
- string
Definition at line 117 of file Csv.php.
The documentation for this class was generated from the following file:
- vendor/magento/zendframework1/library/Zend/Translate/Adapter/Csv.php