当前位置: 首页>>代码示例>>PHP>>正文


PHP Zend_Translate_Adapter::__construct方法代码示例

本文整理汇总了PHP中Zend_Translate_Adapter::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Translate_Adapter::__construct方法的具体用法?PHP Zend_Translate_Adapter::__construct怎么用?PHP Zend_Translate_Adapter::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Zend_Translate_Adapter的用法示例。


在下文中一共展示了Zend_Translate_Adapter::__construct方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 /**
  * 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);
 }
开发者ID:camilorivera,项目名称:INNOVARE,代码行数:36,代码来源:Db.php

示例2: __construct

 /**
  * 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);
 }
开发者ID:openbizx,项目名称:openbizx-cubix,代码行数:15,代码来源:Csv.php

示例3: __construct

 /**
  * 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);
 }
开发者ID:Nerutiz,项目名称:trades,代码行数:32,代码来源:Csv.php

示例4: __construct

 /**
  * @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")));
 }
开发者ID:pawansgi92,项目名称:pimcore2,代码行数:11,代码来源:Translate.php

示例5: __construct

 /**
  * @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;
         }
     }
 }
开发者ID:sgdoc,项目名称:sgdoce-codigo,代码行数:16,代码来源:Message.php

示例6: __construct

 /**
  * 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);
 }
开发者ID:dragonlet,项目名称:clearhealth,代码行数:12,代码来源:Ini.php

示例7: __construct

 /**
  * 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);
 }
开发者ID:jorgenils,项目名称:zend-framework,代码行数:11,代码来源:Gettext.php

示例8: __construct

 /**
  * 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);
 }
开发者ID:vojtajina,项目名称:sitellite,代码行数:14,代码来源:Csv.php

示例9: __construct

 /**
  * 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);
 }
开发者ID:jorgenils,项目名称:zend-framework,代码行数:11,代码来源:Gettext.php

示例10: __construct

	/**
	 * Generates the adapter
	 *
	 * @param  array|Zend_Config $options Translation content
	 */
	public function __construct($options = array()) {
		$this->_options['keyDelimiter'] = ".";
		parent::__construct($options);
	}
开发者ID:redema,项目名称:sapphire,代码行数:9,代码来源:i18nSSLegacyAdapter.php

示例11: __construct

 /**
  * 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));
 }
开发者ID:penSecIT,项目名称:PHProjekt,代码行数:15,代码来源:LanguageAdapter.php

示例12: __construct

 /**
  * 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);
 }
开发者ID:victorli,项目名称:PHProjekt,代码行数:16,代码来源:LanguageAdapter.php


注:本文中的Zend_Translate_Adapter::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。