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


PHP JSession::get方法代码示例

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


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

示例1: get

 /**
  * Get cached data by id and group
  *
  * @param   string   $key        The cache data id
  * @param   string   $group      The cache data group
  * @param   boolean  $checkTime  True to verify cache time expiration threshold
  *
  * @return  mixed  Boolean  false on failure or a cached data object
  */
 public function get($key, $group, $checkTime = true)
 {
     $value = $this->session->get('cache.' . $group . '.' . $key);
     if (!$value) {
         return false;
     }
     return $value;
 }
开发者ID:lyrasoft,项目名称:lyrasoft.github.io,代码行数:17,代码来源:session.php

示例2: getQueue

 /**
  * Get the inner queue.
  *
  * @return  array  The queue.
  */
 public function getQueue()
 {
     $queue = $this->session->get($this->sessionVariable, null, 'rbrowser');
     if (is_array($queue)) {
         end($queue);
         return $queue;
     }
     $queue = array();
     $this->setQueue($queue);
     return $queue;
 }
开发者ID:prox91,项目名称:joomla-dev,代码行数:16,代码来源:history.php

示例3: onContentAfterSave

 /**
  * Sends message if possible
  * 
  * @param type $context
  * @param type $article
  * @param type $isNew
  * @return type
  */
 public function onContentAfterSave($context, &$article, $isNew)
 {
     if (0 !== strpos($context, 'com_content')) {
         return;
     }
     $message = $this->session->get('asar.message');
     if (!empty($message)) {
         $this->app->enqueueMessage($message);
         $this->session->clear('asar.message');
     }
 }
开发者ID:AnythingDig,项目名称:advanced-submit-article-redirect,代码行数:19,代码来源:asar.php

示例4: getGroup

 /**
  * {@inheritdoc}
  */
 public function getGroup($group = self::GROUP_DFAULT, $default = array())
 {
     $data = $this->_session->get($group, $default, $this->_namespace);
     return $data;
 }
开发者ID:JBZoo,项目名称:CrossCMS,代码行数:8,代码来源:Session.php

示例5: getHeadings

 /**
  * Returns the table headings, separated from writable function as
  * when group_by is selected multiple tables are written
  * 09/07/2011 moved headingClass into array rather than string
  *
  * @return  array  (table headings, array columns, $aLinkElements)
  */
 public function getHeadings()
 {
     $package = $this->app->getUserState('com_fabrik.package', 'fabrik');
     $item = $this->getTable();
     $item->order_dir = JString::strtolower($item->order_dir);
     $aTableHeadings = array();
     $headingClass = array();
     $cellClass = array();
     $params = $this->getParams();
     $w = new FabrikWorker();
     $formModel = $this->getFormModel();
     $oldLinksToForms = $this->getLinksToThisKey();
     $linksToForms = array();
     foreach ($oldLinksToForms as $join) {
         // $$$ hugh - another issue with getLinksToThisKey() now returning false for some joins.
         if ($join) {
             $k = $join->list_id . '-' . $join->form_id . '-' . $join->element_id;
             $linksToForms[$k] = $join;
         }
     }
     $groups = $formModel->getGroupsHiarachy();
     $groupHeadings = array();
     $orderBys = json_decode($item->order_by, true);
     if (!isset($orderBys)) {
         $orderBys = array();
     }
     // Responsive element classes
     $listClasses = json_decode($params->get('list_responsive_elements'));
     if (!isset($listClasses->responsive_elements)) {
         $listClasses = new stdClass();
         $listClasses->responsive_elements = array();
     }
     $showInList = $this->showInList();
     if (!in_array($this->outputFormat, array('pdf', 'csv'))) {
         if ($this->canSelectRows() && $params->get('checkboxLocation', 'end') !== 'end') {
             $this->addCheckBox($aTableHeadings, $headingClass, $cellClass);
         }
         if ($params->get('checkboxLocation', 'end') !== 'end') {
             $this->actionHeading($aTableHeadings, $headingClass, $cellClass);
         }
     }
     foreach ($groups as $groupModel) {
         $groupHeadingKey = $w->parseMessageForPlaceHolder($groupModel->getGroup()->label, array(), false);
         $groupHeadings[$groupHeadingKey] = 0;
         $elementModels = $groupModel->getPublishedListElements();
         if ($groupModel->canView('list') === false) {
             continue;
         }
         foreach ($elementModels as $key => $elementModel) {
             $element = $elementModel->getElement();
             // If we define the elements to show in the list - e.g in admin list module then only show those elements
             if (!empty($showInList) && !in_array($element->id, $showInList)) {
                 continue;
             }
             $groupHeadings[$groupHeadingKey]++;
             $key = $elementModel->getFullName(true, false);
             $compositeKey = !empty($showInList) ? array_search($element->id, $showInList) . ':' . $key : $key;
             $orderKey = $elementModel->getOrderbyFullName(false);
             $elementParams = $elementModel->getParams();
             $label = $elementModel->getListHeading();
             $label = $w->parseMessageForPlaceHolder($label, array());
             $elementId = $elementModel->getId();
             if ($elementParams->get('can_order') == '1' && $this->outputFormat != 'csv') {
                 $context = 'com_' . $package . '.list' . $this->getRenderContext() . '.order.' . $elementId;
                 $orderDir = $this->session->get($context);
                 //  No user set order so get it from the list properties
                 if (is_null($orderDir)) {
                     $orderDirs = (array) json_decode($item->order_dir);
                     $orderEls = (array) json_decode($item->order_by);
                     $ix = array_search($elementId, $orderEls);
                     if ($ix !== false) {
                         $orderDir = FArrayHelper::getValue($orderDirs, $ix, '');
                     } else {
                         // nothing set, make an executive decision!
                         $orderDir = '';
                     }
                 }
                 $displayData = new stdClass();
                 $displayData->tmpl = $this->getTmpl();
                 $displayData->orderDir = $orderDir;
                 $displayData->class = '';
                 $displayData->key = $key;
                 $displayData->orderBys = $orderBys;
                 $displayData->item = $item;
                 $displayData->elementParams = $elementParams;
                 $displayData->label = $label;
                 $layout = $this->getLayout('list.fabrik-order-heading');
                 $heading = $layout->render($displayData);
             } else {
                 $heading = $label;
             }
             $aTableHeadings[$compositeKey] = $heading;
             // Check responsive class
//.........这里部分代码省略.........
开发者ID:pascal26,项目名称:fabrik,代码行数:101,代码来源:list.php

示例6: getGroup

 /**
  * Get group data from session
  * @param string $group
  * @param mixed $default
  * @return JSONData
  */
 public function getGroup($group = 'default', $default = array())
 {
     $data = $this->_session->get($group, $default, $this->_namespace);
     return $data;
 }
开发者ID:alexmixaylov,项目名称:real,代码行数:11,代码来源:jbsession.php

示例7: saveByPost

 /**
  * Save history that associated with form data
  * 
  * @param JSession $session
  * @param mixed $post
  * @param string $pageKey
  * @param string $title
  * 
  * @return int ID of saved history
  */
 private function saveByPost($session, $post, $pageKey, $title)
 {
     if (!$session->has($post['postSessionKey'])) {
         return;
     }
     $formData = $session->get($post['postSessionKey']);
     $formHash = md5($formData);
     $form = json_decode($formData);
     $id = $form->cid;
     if (is_array($id)) {
         $id = array_shift($id);
     }
     $userId = JFactory::getUser()->id;
     $history = JTable::getInstance('History', 'PowerAdminTable');
     $history->load(array('user_id' => $userId, 'object_key' => $pageKey, 'object_id' => $id));
     if ($history->id == null) {
         $history->bind(array('user_id' => $userId, 'object_key' => $pageKey, 'object_id' => $id));
     }
     $history->bind(array('title' => $title, 'visited' => time(), 'form' => $formData, 'form_hash' => $formHash, 'component' => empty($history->component) && !empty($post['parent']) ? $post['parent'] : $history->component, 'list_page' => empty($history->list_page) && !empty($post['name']) ? $post['name'] : $history->list_page, 'list_page_params' => empty($history->list_page_params) && !empty($post['params']) ? $post['params'] : $history->list_page_params, 'icon' => empty($history->icon) && !empty($post['iconPath']) ? $post['iconPath'] : $history->icon, 'css' => empty($history->css) && !empty($post['iconCss']) ? $post['iconCss'] : $history->css));
     $history->description = $post['description'];
     $history->store();
     return $history->id;
 }
开发者ID:NallelyFlores89,项目名称:basvec,代码行数:33,代码来源:history.php


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