@@ 164-166 (lines=3) @@ | ||
161 | //if db model is instantiating |
|
162 | if ($bydb) { |
|
163 | //client code has indicated these field values are from the database |
|
164 | foreach ($model_fields as $fieldName => $field) { |
|
165 | $this->set_from_db($fieldName, isset($fieldValues[$fieldName]) ? $fieldValues[$fieldName] : null); |
|
166 | } |
|
167 | } else { |
|
168 | //we're constructing a brand |
|
169 | //new instance of the model object. Generally, this means we'll need to do more field validation |
|
@@ 170-172 (lines=3) @@ | ||
167 | } else { |
|
168 | //we're constructing a brand |
|
169 | //new instance of the model object. Generally, this means we'll need to do more field validation |
|
170 | foreach ($model_fields as $fieldName => $field) { |
|
171 | $this->set($fieldName, isset($fieldValues[$fieldName]) ? $fieldValues[$fieldName] : null, true); |
|
172 | } |
|
173 | } |
|
174 | //remember what values were passed to this constructor |
|
175 | $this->_props_n_values_provided_in_constructor = $fieldValues; |