public function fromArray($arr) { foreach ($arr as $obj) { $nObj = new KalturaMediaEntryFilterForPlaylist(); $nObj->fromObject($obj); $newArr[] = $nObj; } return $newArr; }
public static function fromDbArray(array $arr = null, KalturaDetachedResponseProfile $responseProfile = null) { foreach ($arr as $obj) { $nObj = new KalturaMediaEntryFilterForPlaylist(); $nObj->fromObject($obj, $responseProfile); $newArr[] = $nObj; } return $newArr; }
public function playlistContentXmlToFilters() { list($totalResults, $listOfFilters) = myPlaylistUtils::getPlaylistFilterListStruct($this->playlistContent); // $totalResults is SimpleXMLElement $this->filters = new KalturaMediaEntryFilterForPlaylistArray(); foreach ($listOfFilters as $entryFilterXml) { $entryFilter = new entryFilter(); $entryFilter->fillObjectFromXml($entryFilterXml, "_"); $filter = new KalturaMediaEntryFilterForPlaylist(); $filter->fromObject($entryFilter); $this->filters[] = $filter; } $this->totalResults = (int) $totalResults; // will cast SimpleXMLElement correctly }