• Main Page
  • Related Pages
  • Namespaces
  • Data Structures
  • Files
  • Examples
  • File List

E:/E/GEAMP/www/openbiz/openbiz/others/Zend/Translate/Adapter/Ini.php

00001 <?php
00023 require_once 'Zend/Locale.php';
00024 
00026 require_once 'Zend/Translate/Adapter.php';
00027 
00034 class Zend_Translate_Adapter_Ini extends Zend_Translate_Adapter
00035 {
00036     private $_data = array();
00037 
00046     public function __construct($data, $locale = null, array $options = array())
00047     {
00048         parent::__construct($data, $locale, $options);
00049     }
00050 
00061     protected function _loadTranslationData($data, $locale, array $options = array())
00062     {
00063         $this->_data = array();
00064         if (!file_exists($data)) {
00065             require_once 'Zend/Translate/Exception.php';
00066             throw new Zend_Translate_Exception("Ini file '".$data."' not found");
00067         }
00068 
00069         $inidata = parse_ini_file($data, false);
00070         if (!isset($this->_data[$locale])) {
00071             $this->_data[$locale] = array();
00072         }
00073 
00074         $this->_data[$locale] = array_merge($this->_data[$locale], $inidata);
00075         return $this->_data;
00076     }
00077 
00083     public function toString()
00084     {
00085         return "Ini";
00086     }
00087 }

Generated on Thu Apr 19 2012 17:01:18 for openbiz by  doxygen 1.7.2