src/Models/BaseModel.php
public function addField($field, $value=null) {
        $this->fields[] = $field;
        if ($value != null) $this->set($field, $value);
    }
public function addField($field, $value=null) {
        $this->fields[] = $field;
        if ($value != null) $this->set($field, $value);
    }
public function addField ( $ field , $ value = null ) { $ this -> fields [ ] = $ field ; if ( $ value != null ) $ this -> set ( $ field , $ value ) ; }
Add a new field that can be enter in the json array representation
of the model.
@param string $field name of the field
@param mixed $value a value to be set
Add a new field that can be enter in the json array representation of the model .