/** * 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); }
/** * 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); }
/** * 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); }
/** * @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"))); }
/** * @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; } } }
/** * 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); }
/** * 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); }
/** * 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); }
/** * 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); }
/** * Generates the adapter * * @param array|Zend_Config $options Translation content */ public function __construct($options = array()) { $this->_options['keyDelimiter'] = "."; parent::__construct($options); }
/** * 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)); }
/** * 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); }