/**
  * Update access control profile by id
  * 
  * @action update
  * @param int $id
  * @param KalturaAccessControlProfile $accessControlProfile
  * @return KalturaAccessControlProfile
  * 
  * @throws KalturaErrors::ACCESS_CONTROL_ID_NOT_FOUND
  */
 function updateAction($id, KalturaAccessControlProfile $accessControlProfile)
 {
     $dbAccessControl = accessControlPeer::retrieveByPK($id);
     if (!$dbAccessControl) {
         throw new KalturaAPIException(KalturaErrors::ACCESS_CONTROL_ID_NOT_FOUND, $id);
     }
     $accessControlProfile->toUpdatableObject($dbAccessControl);
     $dbAccessControl->save();
     $accessControlProfile = new KalturaAccessControlProfile();
     $accessControlProfile->fromObject($dbAccessControl);
     return $accessControlProfile;
 }
 public static function fromDbArray($arr, KalturaDetachedResponseProfile $responseProfile = null)
 {
     $newArr = new KalturaAccessControlProfileArray();
     if ($arr == null) {
         return $newArr;
     }
     foreach ($arr as $obj) {
         $nObj = new KalturaAccessControlProfile();
         $nObj->fromObject($obj, $responseProfile);
         $newArr[] = $nObj;
     }
     return $newArr;
 }
 function update($id, KalturaAccessControlProfile $accessControlProfile)
 {
     $kparams = array();
     $this->client->addParam($kparams, "id", $id);
     $this->client->addParam($kparams, "accessControlProfile", $accessControlProfile->toParams());
     $this->client->queueServiceActionCall("accesscontrolprofile", "update", $kparams);
     if ($this->client->isMultiRequest()) {
         return $this->client->getMultiRequestResult();
     }
     $resultObject = $this->client->doQueue();
     $this->client->throwExceptionIfError($resultObject);
     $this->client->validateObjectType($resultObject, "KalturaAccessControlProfile");
     return $resultObject;
 }