File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -298,6 +298,20 @@ class Model extends Overloadable {
298
298
*/
299
299
var $ order = null ;
300
300
301
+ /**
302
+ * Array of virtual fields this model has. Virtual fields are aliased
303
+ * SQL expressions. Fields added to this property will be read as other fields in a model
304
+ * but will not be saveable.
305
+ *
306
+ * `var $virtualFields = array('two' => '1 + 1');`
307
+ *
308
+ * Is a simplistic example of how to set virtualFields
309
+ *
310
+ * @var array
311
+ * @access public
312
+ */
313
+ var $ virtualFields = array ();
314
+
301
315
/**
302
316
* Whether or not the model record exists, set by Model::exists().
303
317
*
@@ -1057,8 +1071,8 @@ function isVirtualField($field) {
1057
1071
*
1058
1072
* @param mixed $name Name of field to look for
1059
1073
* @return mixed If $field is string expression bound to virtual field $field
1060
- * If $field is null, returns an array of all model virtual fields
1061
- * or false if none $field exist.
1074
+ * If $field is null, returns an array of all model virtual fields
1075
+ * or false if none $field exist.
1062
1076
* @access public
1063
1077
*/
1064
1078
function getVirtualField ($ field = null ) {
You can’t perform that action at this time.
0 commit comments