After Row – Guide

In the example below, the “CODE” => instance array, containing the device instances already present in Deepser, is updated with “CODE” key and the instance of the record just saved into the Database.

/*  if $model object is not null */
if($model){
    /*  the orginal array with data in the DB table is updated with “CODE” key and the instance of the object 
        just saved */
    $deviceArray[$model->getCustCode()] = $model;
}