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


PHP cache::getType方法代码示例

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


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

示例1: isset

 $rateOption = isset($_POST['ratingoption']) ? $_POST['ratingoption'] + 0 : 0;
 $rateCache = isset($_POST['rating']) ? $_POST['rating'] + 0 : 0;
 $ocTeamComment = isset($_REQUEST['teamcomment']) ? $_REQUEST['teamcomment'] != 0 : 0;
 $suppressMasslogWarning = isset($_REQUEST['suppressMasslogWarning']) ? $_REQUEST['suppressMasslogWarning'] : ($masslogCookieSet ? $masslogCookieContent : 0);
 if (isset($_GET['fieldnoteid']) && !isset($_POST['submitform']) && !empty($fieldNote)) {
     $_POST['descMode'] = 3;
     $fieldNoteDate = DateTime::createFromFormat('Y-m-d H:i:s', $fieldNote['date']);
     $logDateDay = $fieldNoteDate->format('d');
     $logDateMonth = $fieldNoteDate->format('m');
     $logDateYear = $fieldNoteDate->format('Y');
     $logTimeHour = $fieldNoteDate->format('H');
     $logTimeMinute = $fieldNoteDate->format('i');
     $logText = $fieldNote['text'];
     switch ($fieldNote['type']) {
         case FieldNote::LOG_TYPE_FOUND:
             if (in_array($cache->getType(), \AppBundle\Entity\Geocache::EVENT_CACHE_TYPES)) {
                 $logType = GeocacheLog::LOG_TYPE_ATTENDED;
             } else {
                 $logType = GeocacheLog::LOG_TYPE_FOUND;
             }
             break;
         case FieldNote::LOG_TYPE_NOT_FOUND:
             $logType = GeocacheLog::LOG_TYPE_NOT_FOUND;
             break;
         case FieldNote::LOG_TYPE_NOTE:
             $logType = GeocacheLog::LOG_TYPE_NOTE;
             break;
         case FieldNote::LOG_TYPE_NEEDS_MAINTENANCE:
             $logType = GeocacheLog::LOG_TYPE_NOTE;
             $needsMaintenance = GeocacheLog::NEEDS_MAINTENANCE_ACTIVATE;
             break;
开发者ID:kratenko,项目名称:oc-server3,代码行数:31,代码来源:log.php

示例2: isset

 //   logtext, logtype, logday, logmonth, logyear
 $logText = isset($_POST['logtext']) ? $_POST['logtext'] : '';
 $logType = isset($_REQUEST['logtype']) ? $_REQUEST['logtype'] + 0 : null;
 $logDateDay = isset($_POST['logday']) ? trim($_POST['logday']) : ($datesaved ? $defaultLogDay : date('d'));
 $logDateMonth = isset($_POST['logmonth']) ? trim($_POST['logmonth']) : ($datesaved ? $defaultLogMonth : date('m'));
 $logDateYear = isset($_POST['logyear']) ? trim($_POST['logyear']) : ($datesaved ? $defaultLogYear : date('Y'));
 $logTimeHour = isset($_POST['loghour']) ? trim($_POST['loghour']) : "";
 $logTimeMinute = isset($_POST['logminute']) ? trim($_POST['logminute']) : "";
 $needsMaintenance = isset($_POST['needs_maintenance2']) ? $_POST['needs_maintenance2'] + 0 : (isset($_POST['needs_maintenance']) ? $_POST['needs_maintenance'] + 0 : 0);
 $listingOutdated = isset($_POST['listing_outdated2']) ? $_POST['listing_outdated2'] + 0 : (isset($_POST['listing_outdated']) ? $_POST['listing_outdated'] + 0 : 0);
 $confirmListingOk = isset($_POST['confirm_listing_ok']) ? $_POST['confirm_listing_ok'] + 0 : 0;
 $rateOption = isset($_POST['ratingoption']) ? $_POST['ratingoption'] + 0 : 0;
 $rateCache = isset($_POST['rating']) ? $_POST['rating'] + 0 : 0;
 $ocTeamComment = isset($_REQUEST['teamcomment']) ? $_REQUEST['teamcomment'] != 0 : 0;
 $suppressMasslogWarning = isset($_REQUEST['suppressMasslogWarning']) ? $_REQUEST['suppressMasslogWarning'] : ($masslogCookieSet ? $masslogCookieContent : 0);
 if (!in_array($logType, $logtype_allows_nm) || $cache->getType() == 6) {
     $needsMaintenance = $listingOutdated = 0;
 } else {
     if ($needsMaintenance != 1 && $needsMaintenance != 2) {
         $needsMaintenance = 0;
     }
     if ($listingOutdated != 1 && $listingOutdated != 2) {
         $listingOutdated = 0;
     }
 }
 if ($listingOutdated == 1 && !$confirmListingOk) {
     $listingOutdated = 0;
 }
 // if not a found log, ignore the rating
 $rateOption = ($logType == 1 || $logType == 7) + 0;
 // get logtext editormode (from form or from userprofile)
开发者ID:kirstenko,项目名称:oc-server3,代码行数:31,代码来源:log.php

示例3: getValidLogTypes

 function getValidLogTypes()
 {
     $cache = new cache($this->getCacheId());
     if ($cache->exist() == false) {
         return array();
     }
     if ($cache->allowLog() == false) {
         return array();
     }
     $nTypes = array();
     $rs = sql("SELECT `log_type_id` FROM `cache_logtype` WHERE `cache_type_id`='&1'", $cache->getType());
     while ($r = sql_fetch_assoc($rs)) {
         $nTypes[] = $r['log_type_id'];
     }
     sql_free_result($rs);
     return $nTypes;
 }
开发者ID:RH-Code,项目名称:opencaching,代码行数:17,代码来源:cachelog.class.php


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