@@ 145-147 (lines=3) @@ | ||
142 | //if db model is instantiating |
|
143 | if ( $bydb ){ |
|
144 | //client code has indicated these field values are from the database |
|
145 | foreach( $model_fields as $fieldName => $field ){ |
|
146 | $this->set_from_db( $fieldName, isset( $fieldValues[ $fieldName] ) ? $fieldValues[ $fieldName ] : null ); |
|
147 | } |
|
148 | } else { |
|
149 | //we're constructing a brand |
|
150 | //new instance of the model object. Generally, this means we'll need to do more field validation |
|
@@ 151-153 (lines=3) @@ | ||
148 | } else { |
|
149 | //we're constructing a brand |
|
150 | //new instance of the model object. Generally, this means we'll need to do more field validation |
|
151 | foreach( $model_fields as $fieldName => $field ){ |
|
152 | $this->set( $fieldName, isset( $fieldValues[ $fieldName ] ) ? $fieldValues[ $fieldName ] : null, true ); |
|
153 | } |
|
154 | } |
|
155 | ||
156 | //remember what values were passed to this constructor |