當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Schedule::availableRecordFilters方法代碼示例

本文整理匯總了PHP中Schedule::availableRecordFilters方法的典型用法代碼示例。如果您正苦於以下問題:PHP Schedule::availableRecordFilters方法的具體用法?PHP Schedule::availableRecordFilters怎麽用?PHP Schedule::availableRecordFilters使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Schedule的用法示例。


在下文中一共展示了Schedule::availableRecordFilters方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: generateFilter

/**
 *  Generates a schedule filter parameter from the POST parameters
 **/
function generateFilter()
{
    $total = 0;
    foreach (Schedule::availableRecordFilters() as $id => $filter) {
        $enabled = intval($_POST["recordfilter_{$id}"]);
        $total |= $enabled << $id;
    }
    return $total;
}
開發者ID:knowledgejunkie,項目名稱:mythweb,代碼行數:12,代碼來源:schedule_utils.php

示例2: recordFilters

 /**
      *
      * @return an array of the filters for this Schedule.  Array includes
      * a property called "enabled" to indicate if the filter is enabled.
      *
     /**/
 public function recordFilters()
 {
     $filters = array();
     foreach (Schedule::availableRecordFilters() as $id => $filter) {
         $filters[$id] = $filter;
         $mask = 1 << $id;
         $filters[$id]['enabled'] = ($this->filter & $mask) == $mask;
     }
     return $filters;
 }
開發者ID:antonyraj15411,項目名稱:mythweb,代碼行數:16,代碼來源:Schedule.php

示例3: recordFilters

 /**
      *
      * @return an array of the filters for this Schedule.  Array includes
      * a property called "enabled" to indicate if the filter is enabled.
      * If this is not a real schedule "enabled" is from the newruledefault
      * property
      *
     /**/
 public function recordFilters()
 {
     $filters = array();
     foreach (Schedule::availableRecordFilters() as $id => $filter) {
         $filters[$id] = $filter;
         // if this is a real schedule, use the filter property
         if ($this->recordid) {
             $mask = 1 << $id;
             $filters[$id]['enabled'] = ($this->filter & $mask) == $mask;
             // otherwise it's not a real schedule, so use the default value
         } else {
             $filters[$id]['enabled'] = $filter['newruledefault'];
         }
     }
     return $filters;
 }
開發者ID:AndrewMoore10,項目名稱:MythWebKGTV,代碼行數:24,代碼來源:Schedule.php


注:本文中的Schedule::availableRecordFilters方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。