Exemplo n.º 1
0
 public static function fromPlaylistArray($arr)
 {
     $newArr = new KalturaPlaylistArray();
     if ($arr == null) {
         return $newArr;
     }
     foreach ($arr as $obj) {
         $nObj = new KalturaPlaylist();
         $nObj->fromObject($obj);
         $newArr[] = $nObj;
     }
     return $newArr;
 }
Exemplo n.º 2
0
 /**
  * Retrieve playlist statistics
  *
  * @action getStatsFromContent
  * @param KalturaPlaylistType $playlistType
  * @param string $playlistContent
  * @return KalturaPlaylist
  */
 function getStatsFromContentAction($playlistType, $playlistContent)
 {
     myDbHelper::$use_alternative_con = myDbHelper::DB_HELPER_CONN_PROPEL3;
     $dbPlaylist = new entry();
     $dbPlaylist->setId(-1);
     // set with some dummy number so the getDataContent will later work properly
     $dbPlaylist->setType(entryType::PLAYLIST);
     // prepare the playlist type before filling from request
     $dbPlaylist->setMediaType($playlistType);
     $dbPlaylist->setDataContent($playlistContent);
     myPlaylistUtils::updatePlaylistStatistics($this->getPartnerId(), $dbPlaylist);
     //, $extra_filters , $detailed );
     $playlist = new KalturaPlaylist();
     // start from blank
     $playlist->fromObject($dbPlaylist, $this->getResponseProfile());
     return $playlist;
 }