code: public function addField($field, $value)
      {
          if (!in_array($field, $this->fields)) {
              $this->fields[$field] = $value;
          }
      }
docs: Add field
  
  @param string $field Field
  @param mixed $value Value