From 8efc00598a03b0bae0785d972f04843e9941a0be Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Tue, 2 Jun 2009 03:45:22 +0000 Subject: [PATCH] MINOR Renamed parameter in DataObject->db() to $fieldName git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78236 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/model/DataObject.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/core/model/DataObject.php b/core/model/DataObject.php index b7563491e..4151f984f 100644 --- a/core/model/DataObject.php +++ b/core/model/DataObject.php @@ -1403,9 +1403,10 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity * Return all of the database fields defined in self::$db and all the parent classes. * Doesn't include any fields specified by self::$has_one. Use $this->has_one() to get these fields * + * @param string $fieldName Limit the output to a specific field name * @return array The database fields */ - public function db($component = null) { + public function db($fieldName = null) { $classes = ClassInfo::ancestry($this); $good = false; $items = array(); @@ -1419,11 +1420,11 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity continue; } - if($component) { + if($fieldName) { $db = Object::get_static($class, 'db'); - if(isset($db[$component])) { - return $db[$component]; + if(isset($db[$fieldName])) { + return $db[$fieldName]; } } else { $newItems = (array) Object::get_static($class, 'db');