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


PHP Zend_Translate_Adapter::getAdapter方法代码示例

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


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

示例1: setTranslator

 /**
  * Sets a translation Adapter for translation
  *
  * @param  Zend_Translate|Zend_Translate_Adapter $translate
  * @return Zend_View_Helper_HeadTitle
  */
 public function setTranslator($translate)
 {
     if ($translate instanceof Zend_Translate_Adapter) {
         $this->_translator = $translate;
     } elseif ($translate instanceof Zend_Translate) {
         $this->_translator = $translate->getAdapter();
     } else {
         require_once 'Zend/View/Exception.php';
         throw new Zend_View_Exception("You must set an instance of Zend_Translate or Zend_Translate_Adapter");
     }
     return $this;
 }
开发者ID:quangbt2005,项目名称:vhost-kis,代码行数:18,代码来源:HeadTitle.php

示例2: setTranslator

 /**
  * Sets a translation Adapter for translation
  *
  * @param  Zend_Translate|Zend_Translate_Adapter $translate
  * @return Zend_View_Helper_HeadTitle
  */
 public function setTranslator($translate)
 {
     if ($translate instanceof Zend_Translate_Adapter) {
         $this->_translator = $translate;
     } elseif ($translate instanceof Zend_Translate) {
         $this->_translator = $translate->getAdapter();
     } else {
         $e = new Zend_View_Exception("You must set an instance of Zend_Translate or Zend_Translate_Adapter");
         $e->setView($this->view);
         throw $e;
     }
     return $this;
 }
开发者ID:bradley-holt,项目名称:zf2,代码行数:19,代码来源:HeadTitle.php

示例3: setTranslator

 /**
  * Set translator
  *
  * @param  Zend_Translate|Zend_Translate_Adapter|null $translator
  * @return Zend_View_Helper_FormElement
  */
 public function setTranslator($translator = null)
 {
     if (null === $translator) {
         $this->_translator = null;
     } elseif ($translator instanceof Zend_Translate_Adapter) {
         $this->_translator = $translator;
     } elseif ($translator instanceof Zend_Translate) {
         $this->_translator = $translator->getAdapter();
     } else {
         $e = new Zend_View_Exception('Invalid translator specified');
         $e->setView($this->view);
         throw $e;
     }
     return $this;
 }
开发者ID:NerdGZ,项目名称:icingaweb2,代码行数:21,代码来源:FormElement.php

示例4: setTranslator

 /**
  * Set translation object
  *
  * @param  Zend_Translate|Zend_Translate_Adapter|null $translator
  * @return Zend_Filter_Input
  */
 public function setTranslator($translator = null)
 {
     if (null === $translator || $translator instanceof Zend_Translate_Adapter) {
         $this->_translator = $translator;
     } elseif ($translator instanceof Zend_Translate) {
         $this->_translator = $translator->getAdapter();
     } else {
         require_once 'Zend/Validate/Exception.php';
         throw new Zend_Validate_Exception('Invalid translator specified');
     }
     return $this;
 }
开发者ID:cljk,项目名称:kimai,代码行数:18,代码来源:Input.php

示例5: setDefaultTranslator

 /**
  * Set default translation object for all validate objects
  *
  * @param  Zend_Translate|Zend_Translate_Adapter|null $translator
  * @return void
  */
 public static function setDefaultTranslator($translator = null)
 {
     if (null === $translator || $translator instanceof Zend_Translate_Adapter) {
         self::$_defaultTranslator = $translator;
     } elseif ($translator instanceof Zend_Translate) {
         self::$_defaultTranslator = $translator->getAdapter();
     } else {
         #require_once 'Zend/Validate/Exception.php';
         throw new Zend_Validate_Exception('Invalid translator specified');
     }
 }
开发者ID:par-orillonsoft,项目名称:Magento,代码行数:17,代码来源:Abstract.php

示例6: setTranslator

 /**
  * Sets a translation Adapter for translation
  *
  * @param  Zend_Translate|Zend_Translate_Adapter $translate Instance of Zend_Translate
  * @throws Zend_View_Exception When no or a false instance was set
  * @return Zend_View_Helper_Translate
  */
 public function setTranslator($translate)
 {
     if ($translate instanceof Zend_Translate_Adapter) {
         $this->_translator = $translate;
     } else {
         if ($translate instanceof Zend_Translate) {
             $this->_translator = $translate->getAdapter();
         } else {
             require_once 'Zend/View/Exception.php';
             $e = new Zend_View_Exception('You must set an instance of Zend_Translate or Zend_Translate_Adapter');
             $e->setView($this->view);
             throw $e;
         }
     }
     return $this;
 }
开发者ID:fredcido,项目名称:cenbrap,代码行数:23,代码来源:Translate.php

示例7: setDefaultTranslator

 /**
  * Set global default translator object
  *
  * @param  Zend_Translate|Zend_Translate_Adapter|null $translator
  * @return void
  */
 public static function setDefaultTranslator($translator = null)
 {
     if (null === $translator) {
         self::$_translatorDefault = null;
     } elseif ($translator instanceof Zend_Translate_Adapter) {
         self::$_translatorDefault = $translator;
     } elseif ($translator instanceof Zend_Translate) {
         self::$_translatorDefault = $translator->getAdapter();
     } else {
         //require_once 'Zend/Form/Exception.php';
         throw new Zend_Form_Exception('Invalid translator specified');
     }
 }
开发者ID:schlypel,项目名称:YiiBackboneBoilerplate,代码行数:19,代码来源:Form.php

示例8: setTranslator

 /**
  * Set translator object
  *
  * @param  Zend_Translate|Zend_Translate_Adapter|null $translator
  * @return Zend_Form_DisplayGroup
  */
 public function setTranslator($translator = null)
 {
     if (null === $translator || $translator instanceof Zend_Translate_Adapter) {
         $this->_translator = $translator;
     } elseif ($translator instanceof Zend_Translate) {
         $this->_translator = $translator->getAdapter();
     } else {
         throw new Zend_Form_Exception('Invalid translator specified');
     }
     return $this;
 }
开发者ID:kobmaki,项目名称:icingaweb2,代码行数:17,代码来源:DisplayGroup.php

示例9: setTranslator

 /**
  * Sets translator object to use
  * 
  * @param Zend_Translate|Zend_Translate_Adapter|null $translator
  */
 public function setTranslator($translator)
 {
     if (null === $translator || $translator instanceof Zend_Translate_Adapter) {
         $this->_translator = $translator;
     } elseif ($translator instanceof Zend_Translate) {
         $this->_translator = $translator->getAdapter();
     }
 }
开发者ID:BGCX262,项目名称:zym-svn-to-git,代码行数:13,代码来源:NavigationAbstract.php

示例10: setDefaultTranslator

 /**
  * Set default translation object for all validate objects
  *
  * @param  Zend_Translate|Zend_Translate_Adapter|null $translator
  * @return void
  */
 public static function setDefaultTranslator($translator = null)
 {
     if (null === $translator || $translator instanceof Zend_Translate_Adapter) {
         self::$_defaultTranslator = $translator;
     } elseif ($translator instanceof Zend_Translate) {
         self::$_defaultTranslator = $translator->getAdapter();
     } else {
         require_once get_template_directory() . '/includes/instagram-php-api/Zend/Validate/Exception.php';
         throw new Zend_Validate_Exception('Invalid translator specified');
     }
 }
开发者ID:pedrofalc,项目名称:mvpcearasteel,代码行数:17,代码来源:Abstract.php

示例11: setTranslator

    /**
     * Sets a translation Adapter for translation
     *
     * @param  Zend_Translate|Zend_Translate_Adapter $translator  instance
     * @throws Zym_Controller_Action_Helper_Exception  on invalid $translator
     * @return Zym_Controller_Action_Helper_Translator
     */
    public function setTranslator($translator)
    {
        if ($translator instanceof Zend_Translate_Adapter) {
            $this->_translator = $translator;
        } else if ($translator instanceof Zend_Translate) {
            $this->_translator = $translator->getAdapter();
        } else {
            /**
             * @see Zym_Controller_Action_Helper_Exception
             */
            require_once 'Zym/Controller/Action/Helper/Exception.php';
            $msg = '$translator must be an instance of Zend_Translate or Zend_Translate_Adapter';
            throw new Zym_Controller_Action_Helper_Exception($msg);
        }

        return $this;
    }
开发者ID:BGCX262,项目名称:zym-svn-to-git,代码行数:24,代码来源:Translator.php

示例12: setDefaultTranslator

 /**
  * Set global default translator object
  *
  * @param  Zend_Translate|Zend_Translate_Adapter|null $translator
  *
  * @throws ZfComplement_DataTable_Exception
  * @return void
  */
 public static function setDefaultTranslator($translator = null)
 {
     if (null === $translator) {
         self::$_translatorDefault = null;
     } elseif ($translator instanceof Zend_Translate_Adapter) {
         self::$_translatorDefault = $translator;
     } elseif ($translator instanceof Zend_Translate) {
         self::$_translatorDefault = $translator->getAdapter();
     } else {
         require_once 'ZfComplement/DataTable/Exception.php';
         throw new ZfComplement_DataTable_Exception('Invalid translator specified');
     }
 }
开发者ID:pedro151,项目名称:zf1-datatable,代码行数:21,代码来源:DataTable.php


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