/** * creates and returns the right CustomFieldValuexxx object, or a * CustomFieldValue object if there is no specific object defined for that type * * @param row * @return A CustomFieldValue object, or a subclass */ function getCustomFieldValueObject($row) { // depending on the type, we should return a different object... Just to // make things easier for clients of the class! But we can use the array with the // mappins to easily figure out the right$ class for the job $constructor = CustomFieldValueFactory::_findConstructorClass((int) $row["field_type"]); $value = new $constructor($row["field_id"], $row["field_value"], $row["field_name"], $row["field_type"], $row["field_description"], $row["article_id"], $row["blog_id"], $row["id"]); return $value; }