本文整理汇总了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);
}
示例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);
}
示例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;
}
}
示例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');
}