Exemplo n.º 1
0
 /**
  * Save the data of an already created clan.
  */
 public static function save(Clan $clan)
 {
     if (!$clan->id()) {
         throw new \Exception('Clan cannot be saved as it does not yet have an id.');
     }
     $updated = update_query('update clan set clan_name = :name, clan_founder = :founder, clan_avatar_url = :avatar_url, description = :desc where clan_id = :id', [':name' => $clan->getName(), ':founder' => $clan->getFounder(), ':avatar_url' => $clan->getAvatarUrl(), ':desc' => $clan->getDescription(), ':id' => $clan->id()]);
     return (bool) $updated;
 }