public static function fromDbArray($arr, KalturaDetachedResponseProfile $responseProfile = null) { $newArr = new KalturaReportArray(); if ($arr == null) { return $newArr; } foreach ($arr as $obj) { $nObj = new KalturaReport(); $nObj->fromObject($obj, $responseProfile); $newArr[] = $nObj; } return $newArr; }
public static function fromDbArray($arr) { $newArr = new KalturaReportArray(); if ($arr == null) { return $newArr; } foreach ($arr as $obj) { $nObj = new KalturaReport(); $nObj->fromObject($obj); $newArr[] = $nObj; } return $newArr; }
/** * @action update * @param int $id * @param KalturaReport $report * @return KalturaReport */ function updateAction($id, KalturaReport $report) { $dbReport = ReportPeer::retrieveByPK($id); if (is_null($dbReport)) { throw new KalturaAPIException(KalturaErrors::REPORT_NOT_FOUND, $id); } $report->toUpdatableObject($dbReport); $dbReport->save(); $report->fromObject($dbReport, $this->getResponseProfile()); return $report; }
/** * * * @param int $id * @param KalturaReport $report * @return KalturaReport */ function update($id, KalturaReport $report) { $kparams = array(); $this->client->addParam($kparams, "id", $id); $this->client->addParam($kparams, "report", $report->toParams()); $this->client->queueServiceActionCall("adminconsole_reportadmin", "update", $kparams); if ($this->client->isMultiRequest()) { return $this->client->getMultiRequestResult(); } $resultObject = $this->client->doQueue(); $this->client->throwExceptionIfError($resultObject); $this->client->validateObjectType($resultObject, "KalturaReport"); return $resultObject; }