original_string: public function hydrate($data, $removePrimaryKey = false)
      {
          foreach ($data as $key => $value) {
              if (property_exists($this, $key)) {
                  $this->$key = $value;
              } else {
                  $this->extra[$key] = $value;
              }
          }
          if ($removePrimaryKey) {
              $key = $this->getPrimaryKey();
              $this->$key = null;
          }
          return $this;
      }
code: public function hydrate($data, $removePrimaryKey = false)
      {
          foreach ($data as $key => $value) {
              if (property_exists($this, $key)) {
                  $this->$key = $value;
              } else {
                  $this->extra[$key] = $value;
              }
          }
          if ($removePrimaryKey) {
              $key = $this->getPrimaryKey();
              $this->$key = null;
          }
          return $this;
      }
code_tokens: public function hydrate ( $ data , $ removePrimaryKey = false ) { foreach ( $ data as $ key => $ value ) { if ( property_exists ( $ this , $ key ) ) { $ this -> $ key = $ value ; } else { $ this -> extra [ $ key ] = $ value ; } } if ( $ removePrimaryKey ) { $ key = $ this -> getPrimaryKey ( ) ; $ this -> $ key = null ; } return $ this ; }
docstring: Sets the properties of this object using an associative array,
  where key is the property name and value is the property value.
  
  Properties that do not exist in the current context are ignored.
  
  @param array $data             Associative array
  @param bool  $removePrimaryKey Optional: If true, the primary key of the
  model will be unset. This is useful for hydrating a new object
  and the source ($_POST) erroneously supplies a primary key.
  
  Default: false
  @return static
docstring_tokens: Sets the properties of this object using an associative array where key is the property name and value is the property value .