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


PHP Zend_Controller_Request_Abstract::getParams方法代码示例

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


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

示例1: getPanel

 /**
  * Gets content panel for the Debugbar
  *
  * @return string
  */
 public function getPanel()
 {
     $this->_request = Zend_Controller_Front::getInstance()->getRequest();
     $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');
     if ($viewRenderer->view && method_exists($viewRenderer->view, 'getVars')) {
         $viewVars = $this->_cleanData($viewRenderer->view->getVars());
     } else {
         $viewVars = "No 'getVars()' method in view class";
     }
     $vars = '<div style="width:50%;float:left;">';
     $vars .= '<h4>View variables</h4>' . '<div id="ZFDebug_vars" style="margin-left:-22px">' . $viewVars . '</div>' . '<h4>Request parameters</h4>' . '<div id="ZFDebug_requests" style="margin-left:-22px">' . $this->_cleanData($this->_request->getParams()) . '</div>';
     $vars .= '</div><div style="width:45%;float:left;">';
     if ($this->_request->isPost()) {
         $vars .= '<h4>Post variables</h4>' . '<div id="ZFDebug_post" style="margin-left:-22px">' . $this->_cleanData($this->_request->getPost()) . '</div>';
     }
     $vars .= '<h4>Constants</h4>';
     $constants = get_defined_constants(true);
     ksort($constants['user']);
     $vars .= '<div id="ZFDebug_constants" style="margin-left:-22px">' . $this->_cleanData($constants['user']) . '</div>';
     $registry = Zend_Registry::getInstance();
     $vars .= '<h4>Zend Registry</h4>';
     $registry->ksort();
     $vars .= '<div id="ZFDebug_registry" style="margin-left:-22px">' . $this->_cleanData($registry) . '</div>';
     $cookies = $this->_request->getCookie();
     $vars .= '<h4>Cookies</h4>' . '<div id="ZFDebug_cookie" style="margin-left:-22px">' . $this->_cleanData($cookies) . '</div>';
     $vars .= '</div><div style="clear:both">&nbsp;</div>';
     return $vars;
 }
开发者ID:GemsTracker,项目名称:gemstracker-library,代码行数:33,代码来源:Variables.php

示例2: preDispatch

 public function preDispatch(Zend_Controller_Request_Abstract $request)
 {
     $statsNamespace = new Zend_Session_Namespace('Stats');
     $userAgent = @$_SERVER['HTTP_USER_AGENT'];
     $ip = @$_SERVER['REMOTE_ADDR'];
     if (array_key_exists('HTTP_REFERER', $_SERVER)) {
         $referer = $_SERVER['HTTP_REFERER'];
     } else {
         $referer = '';
     }
     $controller = $request->getControllerName();
     $action = $request->getActionName();
     $module = $request->getModuleName();
     $req = $request->getParams();
     $config = Zend_Registry::get('config');
     $websiteId = $config->website->id;
     $browserStr = @$_SERVER['HTTP_HOST'] . '|' . @$_SERVER['HTTP_USER_AGENT'] . '|' . @$_SERVER['HTTP_ACCEPT_LANGUAGE'] . '|' . @$_SERVER['HTTP_ACCEPT_ENCODING'] . '|' . @$_SERVER['HTTP_ACCEPT_CHARSET'] . '|' . @$_SERVER['HTTP_CONNECTION'] . '|' . $ip;
     if (!isset($statsNamespace->ext_uuid)) {
         $statsNamespace->ext_uuid = 'UID' . uniqid('-' . $websiteId . '-');
         $extUUIDFound = false;
     } else {
         $extUUIDFound = true;
     }
     if ($extUUIDFound === true) {
         $browserHash = $statsNamespace->browserHash;
     } else {
         $browserHash = md5($browserStr);
         $statsNamespace->browserHash = $browserHash;
     }
     $params = array();
     $paramsFromRequest = $request->getParams();
     if (count($paramsFromRequest)) {
         foreach ($paramsFromRequest as $key => $val) {
             if (is_string($key) && (is_string($val) || is_int($val))) {
                 $params[$key] = $val;
             }
         }
     }
     $params = var_export($params, true);
     /* Überprüfen, ob Bot oder realer User */
     $seitenaufrufeModell = new Application_Model_Seitenaufruf();
     $useragentModel = new Application_Model_Useragent();
     $user = $useragentModel->getReturnUseragentIDByHeader($userAgent);
     if ($user === '') {
         $user = 'organic';
     }
     if ($controller == 'link' && $action == 'kampagne') {
         $kid = $request->getParam('kid', 0);
         $statsNamespace->kampagne_id = $kid;
     }
     /* überprüfen, ob es sich um eine Kampagne Handelt */
     if (isset($statsNamespace->kampagne_id)) {
         $kampagne_id = $statsNamespace->kampagne_id;
     } else {
         $kampagne_id = null;
     }
     $seitenaufrufeModell->insert(array('timestamp' => date('Y-m-d H:i:s'), 'modul' => $module, 'controller' => $controller, 'action' => $action, 'params' => $params, 'useragent' => $userAgent, 'ip' => $ip, 'referer' => $referer, 'search' => $this->get_search_phrase($referer), 'sid' => session_id(), 'ext_uuid' => $statsNamespace->ext_uuid, 'browser_id' => $browserHash, 'user' => $user, 'id' => uniqid(), 'kampagne_id' => $kampagne_id));
 }
开发者ID:network-splash,项目名称:prepaidvergleich24.info,代码行数:58,代码来源:Stats.php

示例3: getTableParams

 public function getTableParams()
 {
     $params = $this->request->getParams();
     $paramUrlString = '';
     foreach ($params as $key => $value) {
         if ($key == 'orderBy' or $key == 'page') {
             $paramUrlString .= $key . "/" . $value . "/";
         }
     }
     return $paramUrlString;
 }
开发者ID:blackskaarj,项目名称:webgr,代码行数:11,代码来源:Urls.php

示例4: getPanel

 /**
  * Gets content panel for the Debugbar
  *
  * @return string
  */
 public function getPanel()
 {
     $this->_request = Zend_Controller_Front::getInstance()->getRequest();
     $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');
     $viewVars = $viewRenderer->view->getVars();
     $vars = '';
     if ($this->_request->isPost()) {
         $vars .= '<h4>$_POST</h4>' . '<div id="Centurion_ZFDebug_post">' . $this->_cleanData($this->_request->getPost()) . '</div>';
     }
     $vars .= '<h4>$_COOKIE</h4>' . '<div id="Centurion_ZFDebug_cookie">' . $this->_cleanData($this->_request->getCookie()) . '</div>' . '<h4>Request</h4>' . '<div id="Centurion_ZFDebug_requests">' . $this->_cleanData($this->_request->getParams()) . '</div>' . '<h4>View vars</h4>' . '<div id="Centurion_ZFDebug_vars">' . $this->_cleanData($viewVars) . '</div>';
     return $vars;
 }
开发者ID:netconstructor,项目名称:Centurion,代码行数:17,代码来源:Variables.php

示例5: getPanel

 /**
  * Gets content panel for the Debugbar
  *
  * @return string
  */
 public function getPanel()
 {
     $this->_request = Zend_Controller_Front::getInstance()->getRequest();
     $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');
     $viewVars = $viewRenderer->view->getVars();
     foreach ($viewVars as $k => $v) {
         $this->message->addRow(array($k . " - View", self::_cleanData($v)));
     }
     foreach ($this->_request->getParams() as $k => $v) {
         $this->message->addRow(array($k . " - Parameter", self::_cleanData($v)));
     }
     foreach ($this->_request->getCookie() as $k => $v) {
         $this->message->addRow(array($k . " - Cookie", self::_cleanData($v)));
     }
 }
开发者ID:vahid-sohrabloo,项目名称:ZFirebug,代码行数:20,代码来源:Variables.php

示例6: getPanel

 /**
  * Gets content panel for the Debugbar
  *
  * @return string
  */
 public function getPanel()
 {
     $this->_request = Zend_Controller_Front::getInstance()->getRequest();
     $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');
     if ($viewRenderer->view && method_exists($viewRenderer->view, 'getVars')) {
         $viewVars = $this->_cleanData($viewRenderer->view->getVars());
     } else {
         $viewVars = "Pas de m&eacute;thode 'getVars()' dans l\\'objet vue";
     }
     $vars = '';
     if ($this->_request->isPost()) {
         $vars .= '<h4>Superglobale $_POST</h4>' . '<div id="ZFDebug_post">' . $this->_cleanData($this->_request->getPost()) . '</div>';
     }
     $vars .= '<h4>Superglobale $_COOKIE</h4>' . '<div id="ZFDebug_cookie">' . $this->_cleanData($this->_request->getCookie()) . '</div>' . '<h4>Param&egrave;tres de l\'objet Request</h4>' . '<div id="ZFDebug_requests">' . $this->_cleanData($this->_request->getParams()) . '</div>' . '<h4>Variables de vue (Zend_View)</h4>' . '<div id="ZFDebug_vars">' . $viewVars . '</div>';
     return $vars;
 }
开发者ID:rcomone,项目名称:bugtrack,代码行数:21,代码来源:Variables.php

示例7: routeShutdown

 public function routeShutdown(Zend_Controller_Request_Abstract $request)
 {
     $params = $request->getParams();
     $auth = Zend_Auth::getInstance();
     Zend_Registry::set('Zend_Auth', $auth);
     if ($auth->hasIdentity()) {
         $view = Zend_Controller_Front::getInstance()->getParam('bootstrap')->getResource('view');
         $identity = $auth->getIdentity();
         $userDb = new Users_Model_DbTable_User();
         $user = array('id' => $identity->id, 'username' => $identity->username, 'name' => $identity->name, 'email' => $identity->email, 'clientid' => $identity->clientid);
         $authNamespace = new Zend_Session_Namespace('Zend_Auth');
         $authNamespace->user = $user['username'];
         if ($_SESSION['__ZF']['Zend_Auth']['ENT'] - time() < 3600) {
             $authNamespace->setExpirationSeconds(3600);
         }
         Zend_Registry::set('User', $user);
         $view->user = $user;
         $clientDb = new Application_Model_DbTable_Client();
         $client = $clientDb->getClient($user['clientid']);
         Zend_Registry::set('Client', $client);
     } elseif ($params['module'] != 'users' && $params['action'] != 'login') {
         $redirector = Zend_Controller_Action_HelperBroker::getStaticHelper('redirector');
         if (isset($params['id']) && $params['id']) {
             $redirector->gotoSimple('login', 'user', 'users', array('url' => $params['module'] . '|' . $params['controller'] . '|' . $params['action'] . '|' . $params['id']));
         } else {
             $redirector->gotoSimple('login', 'user', 'users', array('url' => $params['module'] . '|' . $params['controller'] . '|' . $params['action']));
         }
     }
 }
开发者ID:dewawi,项目名称:dewawi,代码行数:29,代码来源:Auth.php

示例8: getPanel

 /**
  * Gets content panel for the Debugbar
  *
  * @return string
  */
 public function getPanel()
 {
     $this->_request = Zend_Controller_Front::getInstance()->getRequest();
     $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');
     if ($viewRenderer->view && method_exists($viewRenderer->view, 'getVars')) {
         $viewVars = $this->_cleanData($viewRenderer->view->getVars());
     } else {
         $viewVars = "No 'getVars()' method in view class";
     }
     //        $front = Zend_Controller_Front::getInstance();
     $vars = '';
     if ($this->_request->isPost()) {
         $vars .= '<h4>$_POST</h4>' . '<div id="ZFDebug_post">' . $this->_cleanData($this->_request->getPost()) . '</div>';
     }
     $vars .= '<h4>$_COOKIE</h4>' . '<div id="ZFDebug_cookie">' . $this->_cleanData($this->_request->getCookie()) . '</div>' . '<h4>Request</h4>' . '<div id="ZFDebug_requests">' . $this->_cleanData($this->_request->getParams()) . '</div>' . '<h4>View vars</h4>' . '<div id="ZFDebug_vars">' . $viewVars . '</div>';
     return $vars;
 }
开发者ID:baisoo,项目名称:axiscommerce,代码行数:22,代码来源:Variables.php

示例9: routeShutdown

 /**
  * Sets the application locale and translation based on the locale param, if
  * one is not provided it defaults to english
  *
  * @param Zend_Controller_Request_Abstract $request
  * @return Void
  */
 public function routeShutdown(Zend_Controller_Request_Abstract $request)
 {
     $config = Zend_Registry::get('config');
     $frontController = Zend_Controller_Front::getInstance();
     $params = $request->getParams();
     $registry = Zend_Registry::getInstance();
     // Steps setting the locale.
     // 1. Default language is set in config
     // 2. TLD in host header
     // 3. Locale params specified in request
     $locale = $registry->get('Zend_Locale');
     // Check host header TLD.
     $tld = preg_replace('/^.*\\./', '', $request->getHeader('Host'));
     // Provide a list of tld's and their corresponding default languages
     $tldLocales = $frontController->getParam('tldLocales');
     if (is_array($tldLocales) && array_key_exists($tld, $tldLocales)) {
         // The TLD in the request matches one of our specified TLD -> Locales
         $locale->setLocale(strtolower($tldLocales[$tld]));
     } elseif (isset($params['locale'])) {
         // There is a locale specified in the request params.
         $locale->setLocale(strtolower($params['locale']));
     }
     // Now that our locale is set, let's check which language has been selected
     // and try to load a translation file for it.
     $language = $locale->getLanguage();
     $translate = Garp_I18n::getTranslateByLocale($locale);
     Zend_Registry::set('Zend_Translate', $translate);
     Zend_Form::setDefaultTranslator($translate);
     if (!$config->resources->router->locale->enabled) {
         return;
     }
     $path = '/' . ltrim($request->getPathInfo(), '/\\');
     // If the language is in the path, then we will want to set the baseUrl
     // to the specified language.
     $langIsInUrl = preg_match('/^\\/' . $language . '\\/?/', $path);
     $uiDefaultLangIsInUrl = false;
     $uiDefaultLanguage = false;
     if (isset($config->resources->locale->uiDefault)) {
         $uiDefaultLanguage = $config->resources->locale->uiDefault;
         $uiDefaultLangIsInUrl = preg_match('/^\\/' . $uiDefaultLanguage . '\\/?/', $path);
     }
     if ($langIsInUrl || $uiDefaultLangIsInUrl) {
         if ($uiDefaultLangIsInUrl) {
             $frontController->setBaseUrl($frontController->getBaseUrl() . '/' . $uiDefaultLanguage);
         } else {
             $frontController->setBaseUrl($frontController->getBaseUrl() . '/' . $language);
         }
     } elseif (!empty($config->resources->router->locale->enabled) && $config->resources->router->locale->enabled) {
         $redirectUrl = '/' . $language . $path;
         if ($frontController->getRouter()->getCurrentRouteName() === 'admin' && !empty($config->resources->locale->adminDefault)) {
             $adminDefaultLanguage = $config->resources->locale->adminDefault;
             $redirectUrl = '/' . $adminDefaultLanguage . $path;
         } elseif ($uiDefaultLanguage) {
             $redirectUrl = '/' . $uiDefaultLanguage . $path;
         }
         $this->getResponse()->setRedirect($redirectUrl, 301);
     }
 }
开发者ID:grrr-amsterdam,项目名称:garp3,代码行数:65,代码来源:I18n.php

示例10: loadcommentsAction

 /**
  * load all comments
  * @author Florian Mathis <flo@massiveart.com>
  * @version 1.0
  */
 public function loadcommentsAction()
 {
     $this->core->logger->debug('widgets->blog->CommentController->loadCommentsAction');
     try {
         $this->_helper->viewRenderer->setNoRender();
         $arrFormData = $this->objRequest->getParams();
         return $this->getModelBlogEntryComment()->getAllComments($arrFormData['idBlogentry']);
     } catch (Exception $exc) {
         $this->core->logger->err($exc);
         exit;
     }
 }
开发者ID:BGCX261,项目名称:zoolu-svn-to-git,代码行数:17,代码来源:CommentController.php

示例11: _generUrl

 private function _generUrl($pageNo = null)
 {
     if ($pageNo && !$this->router) {
         $requestParams = $this->zendRequest->getParams();
         $requestParams[$this->pageNoKey] = $pageNo;
         return $this->zendView->url($requestParams, "default", true);
     } else {
         $requestParams = array();
         $requestParams[$this->pageNoKey] = $pageNo;
         return $this->zendView->url($requestParams, $this->router, true);
     }
 }
开发者ID:rocknoon,项目名称:TCVM,代码行数:12,代码来源:Pagination.php

示例12: showChangesAction

 /**
  * Show the changes in the database
  */
 public function showChangesAction()
 {
     $patchLevels = $this->db->fetchPairs('SELECT DISTINCT gpa_level, gpa_level FROM gems__patches ORDER BY gpa_level DESC');
     $searchData['gpa_level'] = reset($patchLevels);
     if ($this->request instanceof \Zend_Controller_Request_Abstract) {
         $searchData = $this->request->getParams() + $searchData;
     }
     $snippet = $this->addSnippet('Database\\StructuralChanges', 'patchLevels', $patchLevels, 'searchData', $searchData);
     if (1 == $this->request->getParam('download')) {
         $snippet->outputText($this->view, $this->_helper);
     }
 }
开发者ID:GemsTracker,项目名称:gemstracker-library,代码行数:15,代码来源:DatabaseAction.php

示例13: preDispatch

 public function preDispatch(Zend_Controller_Request_Abstract $request)
 {
     if ($this->_hooks[4]) {
         $message = 'PRE DISPATCH:' . ' ' . date('Y-m-d H:i:s', time()) . PHP_EOL . var_export($this->getResponse(), TRUE) . PHP_EOL;
         fputs($this->_fh, $message);
         $router = Zend_Controller_Front::getInstance()->getRouter();
         $output = "Used Route: <b>" . $router->getCurrentRouteName() . "</b><br>\n" . "Abbreviation: " . $request->getParam('abbreviation') . "<br>\n" . "Language: " . $request->getParam('language') . "<br>\n" . "Module: " . $request->getModuleName() . "<br>\n" . "Controller: " . $request->getControllerName() . "<br>\n" . "Action: " . $request->getActionName() . "<br>\n" . "----------<br>\n";
         foreach ($request->getParams() as $param => $value) {
             $output .= '&nbsp;&nbsp;&nbsp;' . $param . ':' . $value . "<br>\n";
         }
         echo $output;
     }
 }
开发者ID:br00k,项目名称:tnc-web,代码行数:13,代码来源:Diagnostic.php

示例14: dispatchLoopStartup

 /**
  * Processes the input then sets a registry variable for get and 
  * post filtered data.
  *
  * @param Zend_Controller_Request_Abstract $request
  */
 public function dispatchLoopStartup(Zend_Controller_Request_Abstract $request)
 {
     if (get_magic_quotes_gpc()) {
         $_POST = array_map(array($this, '_stripslashesDeep'), $_POST);
         $_GET = array_map(array($this, '_stripslashesDeep'), $_GET);
         $_COOKIE = array_map(array($this, '_stripslashesDeep'), $_COOKIE);
         $_REQUEST = array_map(array($this, '_stripslashesDeep'), $_REQUEST);
     }
     $filterOptions = array('*' => array('StringTrim', 'StripTags'));
     $getFilter = new Zend_Filter_Input($filterOptions, array(), array_merge($_GET, $request->getParams()));
     $postFilter = new Zend_Filter_Input($filterOptions, array(), $_POST);
     Zend_Registry::set('getFilter', $getFilter);
     Zend_Registry::set('postFilter', $postFilter);
 }
开发者ID:ncsuwebdev,项目名称:otframework,代码行数:20,代码来源:Input.php

示例15: routeStartup

 public function routeStartup(Zend_Controller_Request_Abstract $request)
 {
     try {
         $params = $request->getParams();
         global $timeMonitorStart;
         $objRequest = Monitor_Request::getInstance();
         $objRequest->setTimeStart($timeMonitorStart);
         $objRequest->setParams($params);
         if (isset($params['isDebug']) && $params['isDebug'] == 1) {
             Zend_Controller_Front::getInstance()->throwExceptions(1);
         }
     } catch (Zend_Exception $e) {
         throw $e;
     }
 }
开发者ID:nguyenduong127,项目名称:Project-dll.vn-,代码行数:15,代码来源:Params.php


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