更新任务接口

@param integer $id - 任务ID
@param array $options - 可选参数对象，key: value都为string类型
@description options列表:
name 任务名字
template_content json string 解析模板内容
input_mapping_file 抓取结果映射文件的路径
url_pattern url pattern
output_file 输出文件名字
@return array
770910
public function updateTask($id, $options=array()){

        $data = array();
        
        $data['id'] = $id;

        $data = array_merge($data, $options);

        return $this->request($this->updateTaskUrl, $data);
    }
113913
public function childCount($id, array $options = [])
	{
		$options['for'] = $id;

		$query = $this->findChildren($this->_table->find(), $options);

		return $query->count();
	}
636430
public static function cancel($id, $params = null, $options = null)
    {
        $url = static::classUrl().'/'.$id;
        if (empty($params)) {
            $params = ['status' => 'canceled'];
        } else {
            $params = array_merge($params, ['status' => 'canceled']);
        }
        return static::_directRequest('put', $url, $params, $options);
    }
1097560
public static function load($id, $options = [], $fetchOptions = [])
    {
        $options = ['conditions' => [static::definition()->key() => $id]] + $options;
        return static::find($options)->first($fetchOptions);
    }
474734
function get_options_manager( $id, $load_options = false, $prefix_slug = true ) {
            return FS_Option_Manager::get_manager( ( $prefix_slug ? $this->_slug : '' ) . ( ( ! $prefix_slug || empty( $id ) ) ? '' : '_' ) . $id, $load_options );
        }
696960
public function replaceCollection(array $data, $id, array $options = [])
    {
        $this->setOptions($options);
        $coll = new Collection($this->client, $this->database);
        $coll->setHeaders($this->getHeaders());
        $rs = $coll->replace($data, $id);
        $this->checkResponse($rs);
        unset($rs['_curl_info']);

        return $rs;
    }
116297
public function read($id, array $options = [], Closure $callback = null) {
        return $this->select()
            ->where($this->getPrimaryKey(), $id)
            ->bindCallback($callback)
            ->first($options);
    }
438346
public static function updateSource($id, $sourceId, $params = null, $opts = null)
    {
        return self::_updateNestedResource($id, static::PATH_SOURCES, $sourceId, $params, $opts);
    }
965244
protected function editCurrentResponse(string $id, string $type, string $content, array $options = array()) {
        if(empty($this->responses[$id])) {
            $this->responses[$id] = array();
        }
        
        if(!empty($this->responses[$id])) {
            $msg = \array_shift($this->responses[$id]);
        } else {
            $msg = null;
        }
        
        return $this->editResponse($msg, $type, $content, $options);
    }
1135829
public function saveUser($id, array $options = [ ]) {
        $data = $options;
        $data['id'] = $id;
        return $this->apiPost('user', $data);
    }
898959
public static function update($userId, $id, $params = null, $options = null)
    {
        return self::_userBasedUpdate($userId, $id, $params, $options);
    }
1210014
public function actionUpdate($id)
    {
        $model = $this->findModel($id);
        if ($model->load(Yii::$app->request->post())) {
            if (Request::isAjax()) {
                Yii::$app->getResponse()->format = Response::FORMAT_JSON;
                return ActiveForm::validate($model);
            } elseif ($model->save()) {
                return $this->flash('更新成功', 'success');
            }
        }
        return $this->render('update', [
            'model' => $model,
        ]);
    }
838915
public function find($id, array $options = [])
    {
        $event = Arr::get($options, 'event');

        if (!$event) {
            throw new InvalidArgumentException("You must specify the 'event' key in the options array");
        }

        $endpoint = null;

        switch ($event) {
            case 'charge.created':
            case 'charge.succeeded':
            case 'charge.refunded':
            case 'charge.cancelled':
            case 'charge.failed':
            case 'charge.rescored.to.decline':
                $endpoint = 'charges'; break;

            case 'chargeback.created':
            case 'chargeback.accepted':
            case 'chargeback.rejected':
                $endpoint = 'charges'; break;

            case 'fee.refund.succeeded':
            case 'fee.succeeded':
                $endpoint = 'charges'; break;

            case 'order.activated':
            case 'order.cancelled':
            case 'order.completed':
            case 'order.created':
            case 'order.expired':
            case 'order.payment.cancelled':
            case 'order.payment.received':
                $endpoint = 'charges'; break;

            case 'payout.created':
            case 'payout.failed':
            case 'payout.succeeded':
                $endpoint = 'charges'; break;

            case 'spei.received':
                $endpoint = 'charges'; break;

            case 'subscription.charge.failed':
                $endpoint = 'charges'; break;

            case 'transfer.succeeded':
                $endpoint = 'charges'; break;
        }

        if (!$endpoint) {
            throw new InvalidArgumentException(sprintf("The specified event '%s' is not valid", $event));
        }

        /* @var \Shoperti\PayMe\Response $response */
        $response = $this->gateway->commit('get', $this->gateway->buildUrlFromString("{$endpoint}/{$id}"));
        $response->type = $event;

        return $response;
    }
1155461
public function getRenderedEditor($id, array $options = array())
    {
        $config = clone $this->options;
        $config->setFromArray($options);
        
        $basePath = $this->getView()->basePath($config->getBasePath());
        $editor = new \CKEditor($basePath);
        
        return $editor->replace($id, $this->optionsToCKEditorConfig($config));
    }
1059639
public function actionCustomUpdate($id = '')
    {
        $model = Options::findOne(['id' => $id]);
        if (yii::$app->getRequest()->getIsPost()) {
            if ($model->load(yii::$app->getRequest()->post()) && $model->save()) {
                yii::$app->getSession()->setFlash('success', yii::t('cms', 'Success'));
                return $this->redirect(['custom']);
            } else {
                $errors = $model->getErrors();
                $err = '';
                foreach ($errors as $v) {
                    $err .= $v[0] . '<br>';
                }
                yii::$app->getResponse()->format = Response::FORMAT_JSON;
                return [
                    'err_msg' => $err,
                ];
            }
        } else {
            yii::$app->getResponse()->format = Response::FORMAT_HTML;
            echo '<div class="" id="editForm">';
            echo '<div class="ibox-content">';
            $form = ActiveForm::begin(['options' => ['name' => 'edit']]);
            echo $form->field($model, 'name')->textInput();
            echo $form->field($model, 'input_type')->dropDownList(Constants::getInputTypeItems());
            echo $form->field($model, 'tips')->textInput();
            echo $form->field($model, 'autoload')->dropDownList(Constants::getYesNoItems());
            echo $form->field($model, 'value')->textInput();
            echo $form->field($model, 'sort')->textInput();
            echo $form->defaultButtons();
            ActiveForm::end();
            echo '</div>';
            echo '</div>';
        }
    }
594259
public function remove($id, $options = [])
    {
        $_options = [
            'area' => false,
        ];

        $options = array_merge($_options, $options);

        if ($options['area']) {
            $this->area = $item['area'];
        }

        unset(self::$data[$this->area][$id]);
    }
14751
public function updateProfile($id, array $policies, array $options = [])
    {
        $data = [
            '_id' => $id,
            'body' => [ 'policies' => $policies ]
        ];

        $response = $this->kuzzle->query(
            $this->buildQueryArgs('updateProfile'),
            $data,
            $options
        );

        return new Profile($this, $id, $response['result']['_source'], $response['result']['_meta']);
    }