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


PHP Zend_Controller_Request_Abstract::getCookie方法代码示例

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


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

示例1: getPanel

 /**
  * Gets content panel for the Debug Bar
  *
  * @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>';
     $vars .= '</div><div style="width:45%;float:left;">';
     $vars .= '<h4>Request parameters</h4>' . '<div id="ZFDebug_requests" style="margin-left:-22px">' . $this->cleanData($this->request->getParams()) . '</div>';
     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:tavy315,项目名称:zfdebug,代码行数:34,代码来源:Variables.php

示例2: 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

示例3: 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

示例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');
     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

示例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');
     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

示例6: routeShutdown

 /**
  * Finish routing request
  * Then change language want to translate and keep track lastest language want translate
  *
  * @param type Zend_Controller_Request_Abstract $request
  * @return void
  */
 public function routeShutdown(Zend_Controller_Request_Abstract $request)
 {
     $rememberLanguage = $request->getCookie('lang');
     $languageWantTranslateTo = $request->getParam('lang', $rememberLanguage);
     $notFoundRequestChangingLanguage = empty($languageWantTranslateTo);
     if ($notFoundRequestChangingLanguage || $this->systemNotSupported($languageWantTranslateTo) || $this->notFoundSharedTranslator()) {
         return;
     }
     $this->changeLanguageUsedInApplication($languageWantTranslateTo);
     $this->remember($languageWantTranslateTo);
 }
开发者ID:hungtrinh,项目名称:ProfileManager,代码行数:18,代码来源:I18n.php

示例7: preDispatch

 public function preDispatch(Zend_Controller_Request_Abstract $request)
 {
     $req = array('GET' => $request->getQuery(), 'POST' => $request->getPost(), 'COOKIE' => $request->getCookie(), 'PARAMS' => $request->getUserParams());
     $init = IDS_Init::init(APPLICATION_PATH . '/configs/phpids.ini');
     $ids = new IDS_Monitor($req, $init);
     $result = $ids->run();
     if (!$result->isEmpty()) {
         $compositeLog = new IDS_Log_Composite();
         $compositeLog->addLogger(IDS_Log_File::getInstance($init));
         $compositeLog->execute($result);
     }
 }
开发者ID:knatorski,项目名称:SMS,代码行数:12,代码来源:Ids.php

示例8: preDispatch

 public function preDispatch(Zend_Controller_Request_Abstract $request)
 {
     $lang = $request->getQuery('lang');
     if ($lang) {
         setcookie("syj_lang", $lang, 0, "", "", false, true);
     } else {
         $lang = $request->getCookie('syj_lang');
     }
     if (!$lang) {
         return;
     }
     $translator = Zend_Registry::get('Zend_Translate');
     $adapter = $translator->getAdapter();
     if (!$adapter->isAvailable($lang)) {
         return;
     }
     $adapter->setLocale($lang);
 }
开发者ID:niavok,项目名称:syj,代码行数:18,代码来源:SyjLocale.php

示例9: get

 /**
  * Get a specific cookie from the request.
  *
  * @param \Zend_Controller_Request_Abstract $request
  * @param string $name
  * @param mixed $default
  * @return mixed Cookie value
  */
 public static function get(\Zend_Controller_Request_Abstract $request, $name, $default = null)
 {
     return $request->getCookie($name, $default);
 }
开发者ID:GemsTracker,项目名称:gemstracker-library,代码行数:12,代码来源:Cookies.php


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