當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Zend_Controller_Front::getParam方法代碼示例

本文整理匯總了PHP中Zend_Controller_Front::getParam方法的典型用法代碼示例。如果您正苦於以下問題:PHP Zend_Controller_Front::getParam方法的具體用法?PHP Zend_Controller_Front::getParam怎麽用?PHP Zend_Controller_Front::getParam使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Zend_Controller_Front的用法示例。


在下文中一共展示了Zend_Controller_Front::getParam方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 /**
  * Instance of construct
  * 
  * @param string $layout
  * @param array $options
  */
 public function __construct($layout = 'email', array $options = array())
 {
     $this->frontController = \Zend_Controller_Front::getInstance();
     $resources = $this->frontController->getParam('bootstrap')->getOption('resources');
     if (isset($options['layout'])) {
         $this->layout = new \Zend_Layout($options['layout']);
     } elseif (isset($resources['layout'])) {
         $this->layout = new \Zend_Layout($resources['layout']);
     } else {
         $this->layout = new \Zend_Layout();
     }
     if (isset($options['view'])) {
         $this->layout->setView(new \Zend_View($options['view']));
     } elseif (isset($resources['view'])) {
         $this->layout->setView(new \Zend_View($resources['view']));
     } else {
         $this->layout->setView(new \Zend_View());
     }
     $scriptPath = APPLICATION_PATH . self::EMAIL_PATH;
     if (null !== $this->frontController->getModuleDirectory()) {
         $scriptPath = $this->frontController->getModuleDirectory() . self::EMAIL_PATH;
     }
     $this->layout->setLayout($layout);
     $this->setScriptPath($scriptPath);
 }
開發者ID:lciolecki,項目名稱:zf-extensions-library,代碼行數:31,代碼來源:Html.php

示例2: dispatchLoopStartup

 /**
  * dispatchLoopStartup
  *
  * @param  Zend_Controller_Request_Abstract $oRequest
  * @return void
  */
 public function dispatchLoopStartup(Zend_Controller_Request_Abstract $oRequest)
 {
     // Set layout
     $_layout = $this->_front->getParam('bootstrap')->getPluginResource("layout")->getLayout();
     // Create empty layoutPath array
     $layoutPathAr = array();
     // Loop theme basePath
     foreach ($this->_basePaths as $basePath) {
         foreach ($this->_themes as $theme) {
             // Mount basepath
             $path = $basePath . "/" . $theme;
             // Populate layoutPath array
             $layoutPathAr[] .= $path . "/scripts/layouts/";
         }
     }
     // Set layout path
     $_layout->setLayoutPath($layoutPathAr);
 }
開發者ID:BGCX261,項目名稱:zlayer-svn-to-git,代碼行數:24,代碼來源:Theme.php

示例3: _responseException

 /**
  * _responseException
  *
  * @return void
  */
 private function _responseException()
 {
     if (!$this->_viewRenderer->getResponse()->isException()) {
         return;
     }
     $frontOptions = $this->_front->getParam('bootstrap')->getPluginResource("frontController")->getOptions();
     if (!isset($frontOptions['params']['displayExceptions'])) {
         return;
     }
     if ($frontOptions['params']['displayExceptions'] === false) {
         return;
     }
     $exceptions = $this->_viewRenderer->getResponse()->getException();
     $this->_view->exception = array();
     $this->_view->trace = array();
     foreach ($exceptions as $exception) {
         $message = $exception->getMessage();
         $trace = $exception->getTraceAsString();
         $this->_view->exception[] = $message;
         $this->_view->trace[] = $trace;
     }
 }
開發者ID:BGCX261,項目名稱:zlayer-svn-to-git,代碼行數:27,代碼來源:Abstract.php

示例4: __construct

 /** Construct the variables
  * @access public
  * @return void
  */
 public function __construct()
 {
     $this->_front = Zend_Controller_Front::getInstance()->getRequest();
     $this->_param = $this->_front->getParam('slug');
 }
開發者ID:lesleyauk,項目名稱:findsorguk,代碼行數:9,代碼來源:TreasureReportsMenu.php


注:本文中的Zend_Controller_Front::getParam方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。