public static function fromDbArray($arr, KalturaDetachedResponseProfile $responseProfile = null) { $newArr = new KalturaShortLinkArray(); if ($arr == null) { return $newArr; } foreach ($arr as $obj) { $nObj = new KalturaShortLink(); $nObj->fromObject($obj, $responseProfile); $newArr[] = $nObj; } return $newArr; }
public static function fromDbArray($arr) { $newArr = new KalturaShortLinkArray(); if ($arr == null) { return $newArr; } foreach ($arr as $obj) { $nObj = new KalturaShortLink(); $nObj->fromObject($obj); $newArr[] = $nObj; } return $newArr; }
/** * Mark the short link as deleted * * @action delete * @param string $id * @return KalturaShortLink * * @throws KalturaErrors::INVALID_OBJECT_ID */ function deleteAction($id) { $dbShortLink = ShortLinkPeer::retrieveByPK($id); if (!$dbShortLink) { throw new KalturaAPIException(KalturaErrors::INVALID_OBJECT_ID, $id); } $dbShortLink->setStatus(KalturaShortLinkStatus::DELETED); $dbShortLink->save(); $shortLink = new KalturaShortLink(); $shortLink->fromObject($dbShortLink); return $shortLink; }
function update($id, KalturaShortLink $shortLink) { $kparams = array(); $this->client->addParam($kparams, "id", $id); $this->client->addParam($kparams, "shortLink", $shortLink->toParams()); $this->client->queueServiceActionCall("shortlink_shortlink", "update", $kparams); if ($this->client->isMultiRequest()) { return null; } $resultObject = $this->client->doQueue(); $this->client->throwExceptionIfError($resultObject); $this->client->validateObjectType($resultObject, "KalturaShortLink"); return $resultObject; }