當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。