core/classes/DataModel.class.php
public function offsetSet($key,$value){
        if(!array_key_exists($key,$this->definition)){
            throw new \Disco\exceptions\Exception("Field `{$key}` is not defined by this data model");
        }//if
        $this->data[$key] = $value;
    }
public function offsetSet($key,$value){
        if(!array_key_exists($key,$this->definition)){
            throw new \Disco\exceptions\Exception("Field `{$key}` is not defined by this data model");
        }//if
        $this->data[$key] = $value;
    }
public function offsetSet ( $ key , $ value ) { if ( ! array_key_exists ( $ key , $ this -> definition ) ) { throw new \ Disco \ exceptions \ Exception ( "Field `{$key}` is not defined by this data model" ) ; } //if $ this -> data [ $ key ] = $ value ; }
Set a field of the data model using array access syntax.


@param string $key The key.
@param mixed $value The value.

@throws \Disco\exceptions\Exception When the data model doesn't support that field.
Set a field of the data model using array access syntax .