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; }
function cloneAction($id, KalturaPlaylist $newPlaylist = null) { $kparams = array(); $this->client->addParam($kparams, "id", $id); if ($newPlaylist !== null) { $this->client->addParam($kparams, "newPlaylist", $newPlaylist->toParams()); } $this->client->queueServiceActionCall("playlist", "clone", $kparams); if ($this->client->isMultiRequest()) { return null; } $resultObject = $this->client->doQueue(); $this->client->throwExceptionIfError($resultObject); $this->client->validateObjectType($resultObject, "KalturaPlaylist"); return $resultObject; }
/** * 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; }
function update($id, KalturaPlaylist $playlist, $updateStats = false) { $kparams = array(); $this->client->addParam($kparams, "id", $id); $this->client->addParam($kparams, "playlist", $playlist->toParams()); $this->client->addParam($kparams, "updateStats", $updateStats); $this->client->queueServiceActionCall("playlist", "update", $kparams); if ($this->client->isMultiRequest()) { return null; } $resultObject = $this->client->doQueue(); $this->client->throwExceptionIfError($resultObject); $this->client->validateObjectType($resultObject, "KalturaPlaylist"); return $resultObject; }
function update($id, KalturaPlaylist $playlist, $updateStats = false) { $kparams = array(); $this->client->addParam($kparams, "id", $id); $this->client->addParam($kparams, "playlist", $playlist->toParams()); $this->client->addParam($kparams, "updateStats", $updateStats); $resultObject = $this->client->callService("playlist", "update", $kparams); $this->client->throwExceptionIfError($resultObject); $this->client->validateObjectType($resultObject, "KalturaUiConf"); return $resultObject; }