original_string: public function toAssoc()
      {
          $params = [];
          foreach (Extract::getObjectVars($this) as $key => $value) {
              if (!$value instanceof Relation) {
                  $params[$key] = $value;
              }
          }
          if ($this->getPrimaryKeyValue() === null) {
              unset($params[$this->getPrimaryKey()]);
          }
          return $params;
      }
code: public function toAssoc()
      {
          $params = [];
          foreach (Extract::getObjectVars($this) as $key => $value) {
              if (!$value instanceof Relation) {
                  $params[$key] = $value;
              }
          }
          if ($this->getPrimaryKeyValue() === null) {
              unset($params[$this->getPrimaryKey()]);
          }
          return $params;
      }
code_tokens: public function toAssoc ( ) { $ params = [ ] ; foreach ( Extract :: getObjectVars ( $ this ) as $ key => $ value ) { if ( ! $ value instanceof Relation ) { $ params [ $ key ] = $ value ; } } if ( $ this -> getPrimaryKeyValue ( ) === null ) { unset ( $ params [ $ this -> getPrimaryKey ( ) ] ) ; } return $ params ; }
docstring: Returns an associative array from this object excluding private variables and Relation objects
  
  @return array
docstring_tokens: Returns an associative array from this object excluding private variables and Relation objects