Update a POI.

@param int   $poiId
@param array $baseInfo

@return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
974599
public function update(int $poiId, array $baseInfo)
    {
        $params = [
            'business' => [
                'base_info' => array_merge($baseInfo, ['poi_id' => $poiId]),
            ],
        ];

        return $this->httpPostJson('cgi-bin/poi/updatepoi', $params);
    }
583886
public function update($siteId, $data)
    {
        //ACCESS CHECK
        if (!$this->isAllowed(
            ResourceName::RESOURCE_SITES,
            'admin'
        )
        ) {
            $this->getResponse()->setStatusCode(Response::STATUS_CODE_401);

            return $this->getResponse();
        }

        if (!is_array($data)) {
            throw new \Exception('Invalid data format');
        }

        /** @var \Doctrine\ORM\EntityManager $entityManager */
        $entityManager = $this->getEntityManager();

        /** @var \Rcm\Repository\Site $siteRepo */
        $siteRepo = $entityManager->getRepository(\Rcm\Entity\Site::class);

        if (!$siteRepo->isValidSiteId($siteId)) {
            $this->getResponse()->setStatusCode(Response::STATUS_CODE_400);

            return $this->getResponse();
        }

        /** @var \Rcm\Entity\Site $site */
        $site = $siteRepo->findOneBy(['siteId' => $siteId]);

        $newStatus = $site->getStatus();

        if ($data['status'] == 'D') {
            $newStatus = 'D';
        }
        if ($data['status'] == 'A') {
            $newStatus = 'A';
        }

        $site->setStatus($newStatus);

        $site->setModifiedByUserId(
            $this->getCurrentUserId(),
            "Update site status to {$newStatus} in " . get_class($this)
        );

        $entityManager->persist($site);
        $entityManager->flush($site);

        $this->siteVersionRepo->publish(
            new SiteLocator($site->getDomainName()),
            $this->getSiteManager()->siteToImmutableSiteContent($site),
            $this->getCurrentUserTracking()->getId(),
            __CLASS__ . '::' . __FUNCTION__,
            $site->getSiteId()
        );

        return new JsonModel($site);
    }
1086375
public static BaseResult updatePoi(String accessToken, Poi poi) {
		return updatePoi(accessToken, JsonUtil.toJSONString(poi));
	}
986657
public function update(array $pos)
    {
        if(!isset($pos['id'])) {
            throw new MonetivoException('$pos["id"] is required');
        }

        return $this->merchantApi->call('put', 'pos/' . $pos['id'], [
            'form_params' => $pos
        ])->toArray();
    }
1363923
public function delNearByPoiList($poi_id)
    {
        $url = "https://api.weixin.qq.com/wxa/delnearbypoi?access_token=ACCESS_TOKEN";
        $this->registerApi($url, __FUNCTION__, func_get_args());
        return $this->callPostApi($url, ['poi_id' => $poi_id], true);
    }
1225339
public void updateBaseTile (int fqTileId, int tx, int ty)
    {
        String errmsg = null;
        int tidx = index(tx, ty);

        // this is a bit magical: we pass the fully qualified tile id to
        // the tile manager which loads up from the configured tileset
        // repository the appropriate tileset (which should be a
        // BaseTileSet) and then extracts the appropriate base tile (the
        // index of which is also in the fqTileId)
        try {
            if (fqTileId <= 0) {
                _base[tidx] = null;
            } else {
                _base[tidx] = (BaseTile)_tileMgr.getTile(fqTileId);
            }
            // clear out the fringe (it must be recomputed by the caller)
            _fringe[tidx] = null;

        } catch (ClassCastException cce) {
            errmsg = "Scene contains non-base tile in base layer";
        } catch (NoSuchTileSetException nste) {
            errmsg = "Scene contains non-existent tileset";
        }

        if (errmsg != null) {
            log.warning(errmsg + " [fqtid=" + fqTileId +
                        ", x=" + tx + ", y=" + ty + "].");
        }
    }
934992
public function update($pageId)
    {
        // get the root line of the page, every parent page could be a Mount Page source
        /** @var $pageSelect PageRepository */
        $pageSelect = GeneralUtility::makeInstance(PageRepository::class);
        $rootLineArray = $pageSelect->getRootLine($pageId);

        $currentPage = array_shift($rootLineArray);
        $currentPageUid = (int)$currentPage['uid'];

        if (empty($rootLineArray) && $currentPageUid === 0) {
            return;
        }

        /** @var $rootLine Rootline */
        $rootLine = GeneralUtility::makeInstance(Rootline::class, /** @scrutinizer ignore-type */ $rootLineArray);
        $rootLineParentPageIds = array_map('intval', $rootLine->getParentPageIds());
        $destinationMountProperties = $this->pagesRepository->findMountPointPropertiesByPageIdOrByRootLineParentPageIds($currentPageUid, $rootLineParentPageIds);

        if (empty($destinationMountProperties)) {
            return;
        }

        foreach ($destinationMountProperties as $destinationMount) {
            $this->addPageToMountingSiteIndexQueue($pageId, $destinationMount);
        }
    }
842235
public function update($objectID, array $attributes = []) {
        $params = [
            'id' => $objectID
        ];

        $supportedAttributes = [
            'title'
        ];

        foreach ($supportedAttributes as $supportedAttribute) {
            if (array_key_exists($supportedAttribute, $attributes)) {
                $params[$supportedAttribute] = $attributes[$supportedAttribute];
            }
        }

        $result = $this->api->request(
            'cmdb.object.update',
            $params
        );

        if (!is_array($result) ||
            !array_key_exists('success', $result) ||
            $result['success'] === false) {
            throw new RuntimeException(sprintf(
                'Unable to archive object %s',
                $objectID
            ));
        }

        return $this;
    }
633626
public function updatedBy($guid)
    {
        $model = $this->noInitModel;
        if (!is_string($model->updatedByAttribute)) {
            return $this;
        }
        if ($guid instanceof BaseUserModel) {
            $guid = $guid->getGUID();
        }
        return $this->andWhere([$model->updatedByAttribute => new Binary($guid, Binary::TYPE_UUID)]);
    }
1132988
public static function doUpdate(array $options=array(), $instance=null, $IDField=null) {
		self::prepareQuery($options, $instance, $IDField);
		return self::$instances[$instance]->update($options);
	}
616805
public function update($appId, $scanId, array $input, array $queryParams = [], $defaultInput = true)
    {
        if ($defaultInput) {
            $params = ['scan' => $input];
        } else {
            $params = $input;
        }

        $response = $this->client->patch("{$this->uri($appId)}/{$scanId}", [
            RequestOptions::JSON => $params,
            'query' => $queryParams,
        ]);

        return $this->handleResponse($response);
    }
110064
public static function update($cohortid, $newvalue) {
        global $DB;
        $cohort = $DB->get_record('cohort', array('id' => $cohortid), '*', MUST_EXIST);
        $cohortcontext = \context::instance_by_id($cohort->contextid);
        \external_api::validate_context($cohortcontext);
        require_capability('moodle/cohort:manage', $cohortcontext);
        $newvalue = clean_param($newvalue, PARAM_TEXT);
        if (strval($newvalue) !== '') {
            $record = (object)array('id' => $cohort->id, 'name' => $newvalue, 'contextid' => $cohort->contextid);
            cohort_update_cohort($record);
            $cohort->name = $newvalue;
        }
        return new static($cohort);
    }
542321
private function updateOID() {
    $pkValues = [];
    // collect the values of the primary keys and compose the oid from them
    $pkNames = $this->getMapper()->getPkNames();
    foreach ($pkNames as $pkName) {
      $pkValues[] = self::getValue($pkName);
    }
    $this->oid = new ObjectId($this->getType(), $pkValues);
  }
108996
public function update(UpdateStruct $updateStruct, $tagId)
    {
        try {
            $this->innerGateway->update($updateStruct, $tagId);
        } catch (DBALException $e) {
            throw new RuntimeException('Database error', 0, $e);
        } catch (PDOException $e) {
            throw new RuntimeException('Database error', 0, $e);
        }
    }
810739
public function bindThirdPoi(array $deviceIdentifier, int $poiId, string $appId)
    {
        $params = [
            'device_identifier' => $deviceIdentifier,
            'poi_id' => $poiId,
            'type' => 2,
            'poi_appid' => $appId,
        ];

        return $this->httpPostJson('shakearound/device/bindlocation', $params);
    }
180826
public function updateMysqlDatabase($serverId, $databaseId, array $data)
    {
        return new MysqlDatabase(
            $this->put("servers/$serverId/mysql/$databaseId", $data)['database']
            + ['server_id' => $serverId], $this
        );
    }
870379
@Update()
   public MethodOutcome update(
         @IdParam IdDt theId, 
         @ResourceParam Patient theResource, 
         @ConditionalUrlParam String theConditionalUrl, 
         ServletRequestDetails theRequestDetails,
			IInterceptorBroadcaster theInterceptorBroadcaster) {

      // If we're processing a conditional URL...
      if (isNotBlank(theConditionalUrl)) {
         
         // Pretend we've done the conditional processing. Now let's
         // notify the interceptors that an update has been performed
         // and supply the actual ID that's being updated
         IdDt actual = new IdDt("Patient", "1123");
         
      }
      
      // In a real server, perhaps we would process the conditional 
      // request differently and follow a separate path. Either way,
      // let's pretend there is some storage code here.
      theResource.setId(theId.withVersion("2"));

      // Notify the interceptor framework when we're about to perform an update. This is
		// useful as the authorization interceptor will pick this event up and use it
		// to factor into a decision about whether the operation should be allowed to proceed.
		IBaseResource previousContents = theResource;
		IBaseResource newContents = theResource;
		HookParams params = new HookParams()
			.add(IBaseResource.class, previousContents)
			.add(IBaseResource.class, newContents)
			.add(RequestDetails.class, theRequestDetails)
			.add(ServletRequestDetails.class, theRequestDetails);
		theInterceptorBroadcaster.callHooks(Pointcut.STORAGE_PRESTORAGE_RESOURCE_UPDATED, params);

      MethodOutcome retVal = new MethodOutcome();
      retVal.setCreated(true);
      retVal.setResource(theResource);
      return retVal;
   }