Example #1
0
 /**
  * Generates the adapter
  *
  * @param  array               $db    The DB connection
  * @param  string|Zend_Locale  $locale   OPTIONAL Locale/Language to set, identical with locale identifier,
  *                                       see Zend_Locale for more information
  * @param  array               $options  OPTIONAL Options to set
  */
 public function __construct($db, $locale = null, array $options = array())
 {
     // If $db is null: nothing to do.
     if ($db == null) {
         return;
     }
     // Keep the db reference for possible use
     $this->db = $db;
     // Check whether the view system is PHPLIB. In yes we
     // add all the translations as entities in the view object
     // Get the utilitary objects from the registry
     $registry = Zend_registry::getInstance();
     $zmax_context = $registry->get("zmax_context");
     $config = $zmax_context->config;
     // By default we take the zmax context view, unless it is explicitly given
     if (isset($options['view'])) {
         $this->phplib_view = $options['view'];
     } else {
         if ($config->view->zmax_view_system == "phplib") {
             $this->phplib_view = $zmax_context->view;
         }
     }
     // Now call the parent constructor
     // Adding this option is necessary starting with Zend 1.6, to prevent
     // an ugly message
     $options['disableNotices'] = 'true';
     parent::__construct($db, $locale, $options);
 }
Example #2
0
 /**
  * Generates the adapter
  *
  * @param  string              $data     Translation data
  * @param  string|Zend_Locale  $locale   OPTIONAL Locale/Language to set, identical with locale identifier,
  *                                       see Zend_Locale for more information
  * @param  array               $options  Options for this adapter
  */
 public function __construct($data, $locale = null, array $options = array())
 {
     $this->_options['delimiter'] = ";";
     $this->_options['length'] = 0;
     $this->_options['enclosure'] = '"';
     parent::__construct($data, $locale, $options);
 }
Example #3
0
 /**
  * Generates the adapter
  *
  * @param  array|Zend_Config $options Translation content
  */
 public function __construct($options = array())
 {
     $this->_options['delimiter'] = ";";
     $this->_options['length'] = 0;
     $this->_options['enclosure'] = '"';
     if ($options instanceof Zend_Config) {
         $options = $options->toArray();
     } else {
         if (func_num_args() > 1) {
             $args = func_get_args();
             $options = array();
             $options['content'] = array_shift($args);
             if (!empty($args)) {
                 $options['locale'] = array_shift($args);
             }
             if (!empty($args)) {
                 $opt = array_shift($args);
                 $options = array_merge($opt, $options);
             }
         } else {
             if (!is_array($options)) {
                 $options = array('content' => $options);
             }
         }
     }
     parent::__construct($options);
 }
Example #4
0
 /**
  * @param $locale
  */
 public function __construct($locale)
 {
     if (!$locale instanceof \Zend_Locale) {
         $locale = new \Zend_Locale($locale);
     }
     $locale = (string) $locale;
     parent::__construct(array("locale" => $locale, "content" => array("__pimcore_dummy" => "only_a_dummy")));
 }
Example #5
0
 /**
  * @param  array $options
  * @return void
  */
 public function __construct($options = array())
 {
     $options['scan'] = 'filename';
     parent::__construct($options);
     if (isset(self::$_cache)) {
         $id = 'Zend_Translate_ListaMensagensTipo_' . $this->toString();
         $temp = self::$_cache->load($id);
         if ($temp) {
             $this->_types = $temp;
         }
     }
 }
Example #6
0
 /**
  * Generates the adapter
  *
  * @param  array               $data     Translation data
  * @param  string|Zend_Locale  $locale   OPTIONAL Locale/Language to set, identical with locale identifier,
  *                                       see Zend_Locale for more information
  * @param  array               $options  OPTIONAL Options to set
  */
 public function __construct($data, $locale = null, array $options = array())
 {
     parent::__construct($data, $locale, $options);
 }
Example #7
0
 /**
  * Generates the  adapter
  *
  * @param  array               $options  Options for this adapter
  * @param  string|Zend_Locale  $locale   OPTIONAL Locale/Language to set, identical with locale identifier,
  *                                       see Zend_Locale for more information
  */
 public function __construct($options, $locale = null)
 {
     parent::__construct($options, $locale);
 }
Example #8
0
 /**
  * Generates the adapter
  *
  * @param  string              $data     Translation data
  * @param  string|Zend_Locale  $locale   OPTIONAL Locale/Language to set, identical with locale identifier,
  *                                       see Zend_Locale for more information
  * @param  array               $options  Options for this adapter
  */
 public function __construct($data, $locale = null, array $options = array())
 {
     $this->_options['separator'] = ";";
     $options = array_merge($this->_options, $options);
     parent::__construct($data, $locale, $options);
 }
Example #9
0
 /**
  * Generates the  adapter
  *
  * @param array $options - Options for this adapter
  * @param  string|Zend_Locale  $language  OPTIONAL Language to set, identical with locale identifier,
  *                                        see Zend_Locale for more information
  */
 public function __construct($options, $language = null)
 {
     parent::__construct($options, $language);
 }
Example #10
0
	/**
	 * Generates the adapter
	 *
	 * @param  array|Zend_Config $options Translation content
	 */
	public function __construct($options = array()) {
		$this->_options['keyDelimiter'] = ".";
		parent::__construct($options);
	}
Example #11
0
 /**
  * Generates the adapter.
  *
  * Convert some PHProject lang shortname to the Zend locale names.
  *
  * @param string $data   Path to the default lang file.
  * @param string $locale PHProjekt locale string.
  *
  * @return void
  */
 public function __construct($data, $locale = 'en')
 {
     $locale = self::_convertToZendLocale($locale);
     parent::__construct($data, $locale, array('disableNotices' => true));
 }
Example #12
0
 /**
  * Generates the adapter.
  *
  * Convert some PHProject lang shortname to the Zend locale names.
  *
  * @param string $data   Path to the default lang file.
  * @param string $locale PHProjekt locale string.
  *
  * @return void
  */
 public function __construct($options)
 {
     $options['locale'] = self::_convertToZendLocale($options['locale']);
     $options['disableNotices'] = true;
     parent::__construct($options);
 }