Permalink
Browse files

MINOR Documentation in DataObject

  • Loading branch information...
1 parent 04c8124 commit c36ac4278d3d14052b1bf4f2910e8537c6bfbc02 @chillu chillu committed Dec 6, 2010
Showing with 10 additions and 3 deletions.
  1. +10 −3 core/model/DataObject.php
View
@@ -97,8 +97,11 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
public $destroyed = false;
/**
- * Data stored in this objects database record. An array indexed
- * by fieldname.
+ * Data stored in this objects database record. An array indexed by fieldname.
+ *
+ * Use {@link toMap()} if you want an array representation
+ * of this object, as the $record array might contain lazy loaded field aliases.
+ *
* @var array
*/
protected $record;
@@ -161,7 +164,8 @@ static function set_validation_enabled($enable) {
}
/**
- * Return the complete map of fields on this object, including Created, LastEdited and ClassName
+ * Return the complete map of fields on this object, including "Created", "LastEdited" and "ClassName".
+ * See {@link custom_database_fields()} for a getter that excludes these "base fields".
*
* @param string $class
* @return array
@@ -187,6 +191,9 @@ public static function database_fields($class) {
* into the actual database fields, rather than the name of the field which
* might not equate a database column.
*
+ * Does not include "base fields" like "ID", "ClassName", "Created", "LastEdited",
+ * see {@link database_fields()}.
+ *
* @uses CompositeDBField->compositeDatabaseFields()
*
* @param string $class

0 comments on commit c36ac42

Please sign in to comment.