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; }
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; }
/** * @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; }