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


PHP SPRequest::search方法代码示例

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


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

示例1: submit

 /**
  * Gets the data for a field, verify it and pre-save it.
  * @param SPEntry $entry
  * @param string $tsId
  * @param string $request
  * @return array
  */
 public function submit(&$entry, $tsId = null, $request = 'POST')
 {
     if (count($this->verify($entry, $request))) {
         return SPRequest::search($this->nid, $request);
     } else {
         return array();
     }
 }
开发者ID:kishoreweblabs,项目名称:SobiPro,代码行数:15,代码来源:email.php

示例2: submit

 /**
  * Gets the data for a field, verify it and pre-save it.
  * @param SPEntry $entry
  * @param string $tsId
  * @param string $request
  * @return void
  */
 public function submit(&$entry, $tsId = null, $request = 'POST')
 {
     $data = $this->fetchData($this->multi ? SPRequest::arr($this->nid, array(), $request) : SPRequest::word($this->nid, null, $request));
     if (count($this->verify($entry, $request, $data))) {
         return SPRequest::search($this->nid, $request);
     } else {
         return array();
     }
 }
开发者ID:kishoreweblabs,项目名称:SobiPro,代码行数:16,代码来源:select.php

示例3: submit

 /**
  * Gets the data for a field, verify it and pre-save it.
  * @param SPEntry $entry
  * @param string $tsId
  * @param string $request
  * @return void
  */
 public function submit(&$entry, $tsId = null, $request = 'POST')
 {
     $data = $this->verify($entry, $request);
     if (strlen($data)) {
         return SPRequest::search($this->nid, $request);
     } else {
         return array();
     }
 }
开发者ID:kishoreweblabs,项目名称:SobiPro,代码行数:16,代码来源:textarea.php

示例4: downloadRequest

 private function downloadRequest()
 {
     $pid = SPRequest::cmd('exid');
     $msg = SPFactory::Controller('progress');
     $msg->progress(50, Sobi::Txt('EX.CONNECTING_TO_REPO'));
     $pid = explode('.', $pid);
     $repo = $pid[0];
     $tid = $pid[1];
     $pid = $pid[2];
     $data = SPRequest::search('sprpfield_');
     $answer = array();
     $msg->progress(55, Sobi::Txt('EX.PARSING_RESPONSE'));
     if (count($data)) {
         foreach ($data as $k => $v) {
             $v = strlen($v) && $v != '' ? $v : SPC::NO_VALUE;
             $answer[str_replace('sprpfield_', null, $k)] = $v;
         }
     }
     $defFile = SPLoader::path("etc.repos.{$repo}.repository", 'front', true, 'xml');
     $repository = SPFactory::Instance('services.installers.repository');
     $repository->loadDefinition($defFile);
     try {
         $repository->connect();
     } catch (SPException $x) {
         $msg->error(SPLang::e('REPO_ERR', $x->getMessage()));
         exit;
     }
     $callback = SPRequest::word('callback');
     try {
         array_unshift($answer, $pid);
         array_unshift($answer, $tid);
         array_unshift($answer, $repository->get('token'));
         $msg->progress(60, Sobi::Txt('EX.SENDING_REQUEST_TO', array('repo' => $repository->get('name'))));
         $response = call_user_func_array(array($repository, $callback), $answer);
         //			sleep( 2 );
     } catch (SPException $x) {
         $msg->error(SPLang::e('REPO_ERR', $x->getMessage()));
         exit;
     }
     $this->downloadResponse($response, $repository, $msg);
 }
开发者ID:kishoreweblabs,项目名称:SobiPro,代码行数:41,代码来源:extensions.php

示例5: session

 protected function session(&$ssid)
 {
     /* if it wasn't new search */
     $ssid = SPRequest::cmd('ssid', SPRequest::cmd('ssid', null, 'cookie'));
     $new = false;
     /* otherwise create new ssid */
     if (!$ssid) {
         $ssid = microtime(true) * 100 . '.' . rand(0, 99);
         $new = true;
     }
     $attr = array('ssid' => $ssid, 'uid' => Sobi::My('id'), 'browserData' => SPConfig::serialize(SPBrowser::getInstance()));
     /* get search request */
     if (!count($this->_request)) {
         $r = SPRequest::search('field_');
         if (is_array($r) && count($r)) {
             $attr['requestData'] = SPConfig::serialize($r);
         }
     }
     /* determine the search parameters */
     if ($new) {
         $attr['searchCreated'] = 'FUNCTION:NOW()';
     }
     /* finally save */
     try {
         $this->_db->insertUpdate('spdb_search', $attr);
     } catch (SPException $x) {
         Sobi::Error($this->name(), SPLang::e('CANNOT_CREATE_SESSION_DB_ERR', $x->getMessage()), SPC::ERROR, 500, __LINE__, __FILE__);
     }
     return SPCookie::set('ssid', $ssid, SPCookie::days(7));
 }
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:30,代码来源:search.php


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