public function fillObjectFromXml(SimpleXMLElement $xmlElement)
 {
     parent::fillObjectFromXml($xmlElement);
     $attr = $xmlElement->attributes();
     if (isset($attr['field'])) {
         $this->field = (string) html_entity_decode($attr['field']);
     }
     if (isset($attr['value'])) {
         $this->value = (string) html_entity_decode($attr['value']);
     }
 }
Ejemplo n.º 2
0
 public function fillObjectFromXml(SimpleXMLElement $simple_xml_node, $prefix_to_add, $exclude_params = null)
 {
     if (!is_array($exclude_params)) {
         $exclude_params = array();
     }
     $exclude_params[] = 'advancedSearch';
     $set_field_count = parent::fillObjectFromXml($simple_xml_node, $prefix_to_add, $exclude_params);
     if (isset($simple_xml_node->advancedSearch)) {
         $attr = $simple_xml_node->advancedSearch->attributes();
         if (isset($attr['type']) && class_exists($attr['type'])) {
             $type = (string) $attr['type'];
             KalturaLog::debug("Advanced Search type[{$type}] and value[" . $simple_xml_node->advancedSearch->asXML() . "]");
             $this->advancedSearch = new $type();
             $this->advancedSearch->fillObjectFromXml($simple_xml_node->advancedSearch);
         }
         $set_field_count++;
     }
     return $set_field_count;
 }
 public function fillObjectFromXml(SimpleXMLElement $xmlElement)
 {
     parent::fillObjectFromXml($xmlElement);
     $attr = $xmlElement->attributes();
     if (isset($attr['distributionProfileId']) && strlen($attr['distributionProfileId'])) {
         $this->distributionProfileId = (int) $attr['distributionProfileId'];
     }
     if (isset($attr['entryDistributionFlag']) && strlen($attr['entryDistributionFlag'])) {
         $this->entryDistributionFlag = (int) $attr['entryDistributionFlag'];
     }
     if (isset($attr['entryDistributionStatus']) && strlen($attr['entryDistributionStatus'])) {
         $this->entryDistributionStatus = (int) $attr['entryDistributionStatus'];
     }
     if (isset($attr['distributionSunStatus']) && strlen($attr['distributionSunStatus'])) {
         $this->distributionSunStatus = (int) $attr['distributionSunStatus'];
     }
 }
 public function fillObjectFromXml(SimpleXMLElement $xmlElement)
 {
     parent::fillObjectFromXml($xmlElement);
     $attr = $xmlElement->attributes();
     if (isset($attr['operatorType'])) {
         $this->type = (int) $attr['operatorType'];
     }
     foreach ($xmlElement->item as $child) {
         $attr = $child->attributes();
         if (!isset($attr['type'])) {
             continue;
         }
         $type = (string) $attr['type'];
         $item = new $type();
         $item->fillObjectFromXml($child);
         $this->items[] = $item;
     }
 }
 public function fillObjectFromXml(SimpleXMLElement $xmlElement)
 {
     parent::fillObjectFromXml($xmlElement);
     $attr = $xmlElement->attributes();
     if (isset($attr['categoriesMatchOr'])) {
         $this->categoriesMatchOr = (string) $attr['categoriesMatchOr'];
     }
     if (isset($attr['categoryEntryStatusIn'])) {
         $this->categoryEntryStatusIn = (string) $attr['categoryEntryStatusIn'];
     }
     if (isset($attr['orderBy'])) {
         $this->orderBy = (string) $attr['orderBy'];
     }
     if (isset($attr['categoryIdEqual'])) {
         $this->categoryIdEqual = (int) $attr['categoryIdEqual'];
     }
 }
 public function fillObjectFromXml(SimpleXMLElement $xmlElement)
 {
     parent::fillObjectFromXml($xmlElement);
     $attr = $xmlElement->attributes();
     if (isset($attr['contentLike']) && strlen($attr['contentLike'])) {
         $this->setContentLike($attr['contentLike']);
     }
     if (isset($attr['contentMultiLikeAnd']) && strlen($attr['contentMultiLikeAnd'])) {
         $this->setContentMultiLikeAnd($attr['contentMultiLikeAnd']);
     }
     if (isset($attr['contentMultiLikeOr']) && strlen($attr['contentMultiLikeOr'])) {
         $this->setContentMultiLikeOr($attr['contentMultiLikeOr']);
     }
 }