public static function fromDbArray(array $arr, KalturaDetachedResponseProfile $responseProfile = null) { $newArr = new KalturaEdgeServerArray(); foreach ($arr as $obj) { /* @var $obj StorageProfile */ $nObj = new KalturaEdgeServer(); $nObj->fromObject($obj, $responseProfile); $newArr[] = $nObj; } return $newArr; }
/** * Update edge server by id * * @action update * @param int $edgeServerId * @param KalturaEdgeServer $edgeServer * @return KalturaEdgeServer */ function updateAction($edgeServerId, KalturaEdgeServer $edgeServer) { $dbEdgeServer = EdgeServerPeer::retrieveByPK($edgeServerId); if (!$dbEdgeServer) { throw new KalturaAPIException(KalturaErrors::INVALID_OBJECT_ID, $edgeServerId); } $dbEdgeServer = $edgeServer->toUpdatableObject($dbEdgeServer); $dbEdgeServer->save(); $edgeServer = new KalturaEdgeServer(); $edgeServer->fromObject($dbEdgeServer, $this->getResponseProfile()); return $edgeServer; }