コード例 #1
0
 /**
  * @param mixed $data
  * @param string $contentEncoding
  */
 public function LoadFromData($data, $contentEncoding)
 {
     $this->items = array();
     $this->operator = intval($data->operator);
     foreach ($data->items as $itemData) {
         $item = null;
         if (intval($itemData->type) == FilterItemType::Condition) {
             $item = new FilterCondition();
         } else {
             if (intval($itemData->type) == FilterItemType::Group) {
                 $item = new FilterGroup();
             }
         }
         $item->LoadFromData($itemData, $contentEncoding);
         $this->AddItem($item);
     }
 }
コード例 #2
0
 /**
  * @param mixed $data
  */
 public function LoadFromData($data)
 {
     $this->items = array();
     $this->operator = intval($data->operator);
     foreach ($data->items as $itemData) {
         $item = null;
         if (intval($itemData->type) == 2) {
             $item = new FilterCondition();
         } else {
             if (intval($itemData->type) == 1) {
                 $item = new FilterGroup();
             }
         }
         $item->LoadFromData($itemData);
         $this->AddItem($item);
     }
 }