Update a group

@author Steve Montambeault
@link   http://stevemo.ca

@param array $data

@return Bool
354139
public function update(array $data)
    {
        try
        {
            if ($this->validator->with($data)->validForUpdate())
            {
                $this->groups->update($data);
                return true;
            }
        }
        catch (GroupExistsException $e)
        {
            $this->validator->add('GroupExistsException', $e->getMessage());
        }
        catch (NameRequiredException $e)
        {
            $this->validator->add('NameRequiredException', $e->getMessage());
        }

        return false;
    }
422017
final public function update(array $data)
    {
        $this->query->setStartUpdate($data);

        $this->query->prepare()->bindSetForUpdate($data)->bindWhere()->bindLimit()->execute();

        $this->setRowCount();

        $this->query->close();
    }
545578
public function update(array $data)
    {
        return $this->forge->updateMysqlDatabase($this->serverId, $this->id, $data);
    }
135819
public function update($data)
    {
        $db = Loader::db();
        $dh = Loader::helper('date');
        $bDateModified = $dh->getOverridableNow();
        $bID = $this->getBlockID();

        $v = [$bDateModified, $bID];
        $q = 'update Blocks set bDateModified = ? where bID = ?';

        $r = $db->prepare($q);
        $res = $db->execute($r, $v);

        $this->refreshBlockOutputCache();

        $btID = $this->getBlockTypeID();
        $bt = BlockType::getByID($btID);
        $class = $bt->getBlockTypeClass();
        $app = Facade::getFacadeApplication();
        $bc = $app->build($class, [$this]);
        $bc->save($data);
    }
587165
public function updateUser(array $data)
    {
        $result = $this->httpRaw(self::WECHAT_USER_UPDATE_PREFIX, $data, [
            'access_token' => $this->getAccessToken()
        ]);
        return isset($result['errcode']) && !$result['errcode'];
    }
786559
public function updateGitRepository(array $data)
    {
        return $this->forge->updateSiteGitRepository($this->serverId, $this->id, $data);
    }
354630
public function setFormData(array $data)
    {
        $objData = $this->objData();
        $merged = array_replace_recursive($objData, $data);

        // Remove null values
        $merged = array_filter($merged, function ($val) {
            if ($val === null) {
                return false;
            }

            return true;
        });

        $this->formData = $merged;
        $this->obj()->setData($merged);

        return $this;
    }
560685
public function update(array $data)
    {
        // setup the custom options
        foreach ($this->getCustomOptions() as $key => $value) {
            if (isset($data[$value]) && $data[$value] == 'custom' && $data[$value . '_custom'] != '') {
                $data['_form_' . $value] = $data[$value];
                $data[$value] = $data[$value . '_custom'];
            }
        }
        
        foreach ($data as $key => $value) {
            if (in_array($key, $this->getSerialized())) {
                $value = (is_array($value) ? serialize($value) : serialize(array(
                    $value
                )));
            }
            
            if (in_array($key, $this->getEncrypted()) && $value != '') {
                $value = $this->getEncrypt()->encode($value);
            }
            
            $this->updateSetting($key, $value);
        }
        
        return true;
    }
1004090
public function insertUpdate(array $data)
    {
        $affected = $this->update($data);
        return $affected ?: $this->insert($data);
    }
1022975
public function update(array $data)
    {
        $chatbot = Basecamp::chatbots($this->bucket->id, $this->campfire->id)
                           ->update($this->id, $data);

        $this->setAttributes($chatbot);

        return $chatbot;
    }
911619
public function update(array $data)
    {
        $affected = 0;
        foreach ($this->table->data['data'] as &$rs) {
            if ($this->matchWhere($rs)) {
                $rs = array_merge($rs, $data);
                $affected++;
            }
        }

        if ($affected) {
            $this->table->save();
        }

        return $affected;
    }
1142595
public function update(array $data)
    {
        $id = (int) empty($data['id']) ? 0 : $data['id'];
        if ($id <= 0) {
            throw new Exception('Required field id');
        }
        $person_id = empty($data['person_id']) ? 0 : (int) $data['person_id'];
        unset($data['id'], $data['person_id']);
        return $this->rest->put('people/' .
           ($person_id ? $person_id . '/' : '') .  "$this->action/$id", $data);
    }
313918
public function update($data = array()) {
    foreach ($data as $key => $value) {
      $this->{$key} = $value;
    }

    $postData = array();
    foreach (static::$properties as $name) {
      $postData[$name] = $this->data[$name];
    }

    $this->client->put(static::$path . '/' . $this->id(), $postData);

    return $this;
  }
555
public function update(array $data)
    {
        return $this->forge->updateMysqlUser($this->serverId, $this->id, $data);
    }
870789
public function update(array $data)
    {
        $upload = Basecamp::uploads($this->bucket->id)
                          ->update($this->id, $data);

        $this->setAttributes($upload);

        return $upload;
    }
310345
public function update(array $data)
    {
        $this->attributes = new Collection(array_merge($this->attributes->toArray(), $data));

        return $this->save();
    }
839414
public function update($data)
    {

        if (is_array($data)) {
            if ($this->isAssocStr($data)) {

                $query = "UPDATE " . self::$table . ' SET ';

                $this->values = array_values(array_map(function ($c) {
                    return self::sanitize($c);
                }, $data));

                $this->columns = array_keys($data);

                $columnParam = array_map(function ($column) {
                    return self::sanitize($column) . '=?';
                }, $this->columns);

                $query .= $this->columnize($columnParam);

                if (!empty($this->whereby)) {

                    $query = $query . ' WHERE ' . $this->whereby;
                }

                try {
                    $stm = Connect::getConn()->prepare($query);
                } catch (Exception $e) {

                    static::$response["status"] = "error";
                    static::$response["response"] = $e->getMessage();
                    static::$response["code"]=$e->getCode();
                    return self::terminate(static::$response);
                }

                try {

                    $stm->execute($this->values);

                    static::$response["status"] = "success";
                    static::$response["response"] = "success";
                    static::$response["code"] = 200;

                    return static::terminate(static::$response);

                } catch (Exception $e) {
                    static::$response["status"] = "error";
                    static::$response["response"] = $e->getMessage();
                    static::$response["code"]=$e->getCode();
                    return self::terminate(static::$response);
                }
            }

            static::$response["status"] = "error";
            static::$response["response"] = "Associative array expected in update function but sequential array passed";
            static::$response["code"]=6501;
            return self::terminate(static::$response);

        }
        static::$response["status"] = "error";
        static::$response["response"] = "Unrecognized data. Associative array expected in update function";
        static::$response["code"]=6500;
        return self::terminate(static::$response);
    }