Make a PUT request.

@param array $data

@return mixed
973157
public function call($resource, $method, $data = array())
    {
        $resource = $this->api_url.'/'.$resource;
        $response = $this->getRequest(array(
            'url' => $resource,
            'method' => $method,
            'data' => $data, 
        ))->send();
        
        $result = null;
        if (strlen($response)) {
            $result = $response->{'parse'.$this->_response_format}();
            return $result;
        }

        return false;
    }
925357
public function put($url, $data = '', array $headers = [])
    {
        return $this->executor->execute(
            $url,
            [
                CURLOPT_CUSTOMREQUEST  => 'PUT',
                CURLOPT_HTTPHEADER => $headers,
                CURLOPT_POSTFIELDS => $data,
            ]
        );
    }
1105596
public function put($id = null, $data = array())
    {

        $args = func_get_args();
        if(count($args) == 2){
            $args = $id;
        }else{
            $data = array_pop($args);
        }

        try {
            $this->client->request($this, 'put', $args, $data);
        } catch(Exception $ex) {
            $this->dispatchException($ex);
        }

        return true;
    }
1303963
public function add(array $data)
    {
        $data = $this->resolverFactory->createNewDeviceResolver()->resolve($data);

        return $this->api->request('POST', '/players', [], json_encode($data));
    }
843220
protected function create(array $data)
    {
        $user = User::create([
            'uuid' => (string) Str::uuid(),
            'name' => $data['name'],
            'email' => $data['email'],
            'password' => Hash::make($data['password']),
        ]);

        return $user;
    }
462881
public function prepareRequest(array $data)
    {
        $contact = $this->mautic->getContact();
        $request = ['header' => []];

        $data['formId'] = $this->id;

        // return has to be part of the form data array so Mautic would accept the submission
        if (!isset($data['return'])) {
            $data['return'] = '';
        }

        $request['url'] = $this->getUrl();
        $request['data'] = ['mauticform' => $data];

        if ($contactId = $contact->getId()) {
            $request['data']['mtc_id'] = $contactId;
        }

        if ($contactIp = $contact->getIp()) {
            $request['header'][] = "X-Forwarded-For: $contactIp";
            $request['header'][] = "Client-Ip: $contactIp";
        }

        if ($sessionId = $contact->getSessionId()) {
            $request['header'][] = "Cookie: mautic_session_id=$sessionId";
            $request['header'][] = "Cookie: mautic_device_id=$sessionId";
        }

        if (isset($_SERVER['HTTP_REFERER'])) {
            $request['referer'] = $_SERVER["HTTP_REFERER"];
        }

        $request['query'] = http_build_query($request['data']);

        return $request;
    }
1294887
public function setData(array $data)
    {
        foreach ($data as $name => $value) {
            if (is_string($name)) {
                $this->__set($name, $value);
            }
        }

        return $this;
    }
1228461
public function put($path, $data)
    {
        if (false === $json = $this->runRequest($path, 'PUT', $data)) {
            return false;
        }

        return $this->decode($json);
    }
187710
public function add(array $data = []) : Request
  {
    $this->data = array_merge($this->data, $data);

    $files = array_filter($data, function($file) {
      if (isset($file['type']) && isset($file['name']) && isset($file['size'])) return $file;
    });

    $this->files = array_merge($this->files, $files);
    return $this;
  }
855609
public function update($data)
    {
        $response = $this->api->put($this->url(), $data);
        $this->data = (array) $response->data;

        return $this;
    }
190886
public function update(array $data = [])
    {
        $sql = 'update `' . $this->table . '` set ';
        $sql .= Util::rangeField(Util::add2points(array_keys($data)));

        if (!is_null($this->where)) {
            $sql .= ' where ' . $this->where;

            $this->where = null;

            $data = array_merge($data, $this->where_data_binding);

            $this->where_data_binding = [];
        }

        $stmt = $this->connection->prepare($sql);

        $data = Sanitize::make($data, true);

        $this->bind($stmt, $data);

        // Execution of the request
        $stmt->execute();

        $r = $stmt->rowCount();

        return (int) $r;
    }
1167519
function push($data)
    {
        if(is_array($data) or is_object($data)) $data = serialize($data);
        //入队
        $this->data[] = $data;
        if($this->put_save) $this->save();
    }
882609
final public function save(array $data)
    {
        return array_key_exists('id', $data) ?
            $this->update($data) :
            $this->insert($data);
    }
786559
public function updateGitRepository(array $data)
    {
        return $this->forge->updateSiteGitRepository($this->serverId, $this->id, $data);
    }
545578
public function update(array $data)
    {
        return $this->forge->updateMysqlDatabase($this->serverId, $this->id, $data);
    }
327302
public function put($data)
    {
        file_put_contents($this->path, $data);
        clearstatcache(true, $this->path);

        return $this->getETag();
    }
1085119
public static function put($urls, $data = null, callable $callback = null)
    {
        return static::make('put', $urls, $data, $callback);
    }