original_string: public function update()
      {
          $this->callEvent('update');
  
          if (empty($this->modified)) {
              return;
          }
          $values = array_intersect_key($this->values, $this->modified);
          $where = [static::$primary_key => $this->getPrimaryKey()];
          $this->connection->update(static::$table, $values, $where, static::$types);
          $this->setStored();
      }
code: public function update()
      {
          $this->callEvent('update');
  
          if (empty($this->modified)) {
              return;
          }
          $values = array_intersect_key($this->values, $this->modified);
          $where = [static::$primary_key => $this->getPrimaryKey()];
          $this->connection->update(static::$table, $values, $where, static::$types);
          $this->setStored();
      }
code_tokens: public function update ( ) { $ this -> callEvent ( 'update' ) ; if ( empty ( $ this -> modified ) ) { return ; } $ values = array_intersect_key ( $ this -> values , $ this -> modified ) ; $ where = [ static :: $ primary_key => $ this -> getPrimaryKey ( ) ] ; $ this -> connection -> update ( static :: $ table , $ values , $ where , static :: $ types ) ; $ this -> setStored ( ) ; }
docstring: Update this entity in the database.
docstring_tokens: Update this entity in the database .