From e38dd08ea56b59688da48c7286355671938cbec1 Mon Sep 17 00:00:00 2001 From: Stig Lindqvist Date: Wed, 26 Oct 2011 19:09:04 +1300 Subject: [PATCH] MINOR: Fix docblocks to reference SS_List instead of (now deprecated) DataObjectSet where appropriate --- admin/code/CMSBatchAction.php | 2 +- admin/code/CMSBatchActionHandler.php | 2 +- admin/code/LeftAndMain.php | 2 +- admin/code/MemberTableField.php | 2 +- admin/code/ModelAdmin.php | 2 +- api/JSONDataFormatter.php | 4 ++-- api/RSSFeed.php | 6 +++--- api/RestfulServer.php | 8 ++++---- api/SapphireSoapServer.php | 2 +- api/XMLDataFormatter.php | 4 ++-- core/PaginatedList.php | 4 ++-- dev/BulkLoader.php | 16 ++++++++-------- dev/SapphireTest.php | 22 +++++++++++----------- forms/CheckboxSetField.php | 14 +++++++------- forms/ComplexTableField.php | 4 ++-- forms/TableField.php | 6 +++--- forms/TableListField.php | 20 ++++++++++---------- model/DataDifferencer.php | 2 +- model/DataList.php | 8 ++++---- model/Hierarchy.php | 14 +++++++------- model/SQLMap.php | 2 +- model/Versioned.php | 4 ++-- parsers/TextParser.php | 2 +- search/SearchContext.php | 4 ++-- security/Member.php | 6 +++--- security/Permission.php | 4 ++-- security/PermissionCheckboxSetField.php | 6 +++--- tests/forms/ComplexTableFieldTest.php | 2 +- tests/forms/TableListFieldTest.php | 2 +- 29 files changed, 88 insertions(+), 88 deletions(-) diff --git a/admin/code/CMSBatchAction.php b/admin/code/CMSBatchAction.php index 46370b6a0..14cb34dd1 100644 --- a/admin/code/CMSBatchAction.php +++ b/admin/code/CMSBatchAction.php @@ -32,7 +32,7 @@ abstract class CMSBatchAction extends Object { * Helper method for processing batch actions. * Returns a set of status-updating JavaScript to return to the CMS. * - * @param $objs The DataObjectSet of objects to perform this batch action + * @param $objs The SS_List of objects to perform this batch action * on. * @param $helperMethod The method to call on each of those objects. * @return JSON encoded map in the following format: diff --git a/admin/code/CMSBatchActionHandler.php b/admin/code/CMSBatchActionHandler.php index f26f833fe..3f58f2715 100644 --- a/admin/code/CMSBatchActionHandler.php +++ b/admin/code/CMSBatchActionHandler.php @@ -166,7 +166,7 @@ class CMSBatchActionHandler extends RequestHandler { } /** - * Return a DataObjectSet of ArrayData objects containing the following pieces of info + * Return a SS_List of ArrayData objects containing the following pieces of info * about each batch action: * - Link * - Title diff --git a/admin/code/LeftAndMain.php b/admin/code/LeftAndMain.php index 8a7cc0dea..f24c54f0d 100644 --- a/admin/code/LeftAndMain.php +++ b/admin/code/LeftAndMain.php @@ -393,7 +393,7 @@ class LeftAndMain extends Controller { * Returns the main menu of the CMS. This is also used by init() * to work out which sections the user has access to. * - * @return DataObjectSet + * @return SS_List */ public function MainMenu() { // Don't accidentally return a menu if you're not logged in - it's used to determine access. diff --git a/admin/code/MemberTableField.php b/admin/code/MemberTableField.php index f64fd6f26..238d812c8 100644 --- a/admin/code/MemberTableField.php +++ b/admin/code/MemberTableField.php @@ -54,7 +54,7 @@ class MemberTableField extends ComplexTableField { * @param Controller $controller Controller class which created this field * @param string $name Name of the field (e.g. "Members") * @param mixed $group Can be the ID of a Group instance, or a Group instance itself - * @param DataObjectSet $members Optional set of Members to set as the source items for this field + * @param SS_List $members Optional set of Members to set as the source items for this field * @param boolean $hidePassword Hide the password field or not in the summary? */ function __construct($controller, $name, $group = null, $members = null, $hidePassword = true) { diff --git a/admin/code/ModelAdmin.php b/admin/code/ModelAdmin.php index 46d079227..32c3b6a0e 100644 --- a/admin/code/ModelAdmin.php +++ b/admin/code/ModelAdmin.php @@ -244,7 +244,7 @@ abstract class ModelAdmin extends LeftAndMain { * Returns managed models' create, search, and import forms * @uses SearchContext * @uses SearchFilter - * @return DataObjectSet of forms + * @return SS_List of forms */ protected function getModelForms() { $models = $this->getManagedModels(); diff --git a/api/JSONDataFormatter.php b/api/JSONDataFormatter.php index 5557a74f2..6ef831ab4 100644 --- a/api/JSONDataFormatter.php +++ b/api/JSONDataFormatter.php @@ -116,9 +116,9 @@ class JSONDataFormatter extends DataFormatter { } /** - * Generate a JSON representation of the given {@link DataObjectSet}. + * Generate a JSON representation of the given {@link SS_List}. * - * @param DataObjectSet $set + * @param SS_List $set * @return String XML */ public function convertDataObjectSet(SS_List $set, $fields = null) { diff --git a/api/RSSFeed.php b/api/RSSFeed.php index 5e3d2911b..bccff5a0e 100644 --- a/api/RSSFeed.php +++ b/api/RSSFeed.php @@ -20,7 +20,7 @@ class RSSFeed extends ViewableData { /** * Holds the feed entries * - * @var DataObjectSet + * @var SS_List */ protected $entries; @@ -83,7 +83,7 @@ class RSSFeed extends ViewableData { /** * Constructor * - * @param DataObjectSet $entries RSS feed entries + * @param SS_List $entries RSS feed entries * @param string $link Link to the feed * @param string $title Title of the feed * @param string $description Description of the field @@ -134,7 +134,7 @@ class RSSFeed extends ViewableData { /** * Get the RSS feed entries * - * @return DataObjectSet Returns the {@link RSSFeed_Entry} objects. + * @return SS_List Returns the {@link RSSFeed_Entry} objects. */ function Entries() { $output = new ArrayList(); diff --git a/api/RestfulServer.php b/api/RestfulServer.php index 7ccc71f9e..88e03522d 100644 --- a/api/RestfulServer.php +++ b/api/RestfulServer.php @@ -217,7 +217,7 @@ class RestfulServer extends Controller { $responseFormatter = $this->getResponseDataFormatter(); if(!$responseFormatter) return $this->unsupportedMediaType(); - // $obj can be either a DataObject or a DataObjectSet, + // $obj can be either a DataObject or a SS_List, // depending on the request if($id) { // Format: /api/v1// @@ -262,7 +262,7 @@ class RestfulServer extends Controller { * * @param string $className * @param array $params - * @return DataObjectSet + * @return SS_List */ protected function getSearchQuery($className, $params = null, $sort = null, $limit = null, $existingQuery = null) { if(singleton($className)->hasMethod('getRestfulSearchContext')) { @@ -592,7 +592,7 @@ class RestfulServer extends Controller { } /** - * Restful server handler for a DataObjectSet + * Restful server handler for a SS_List * * @package sapphire * @subpackage api @@ -630,7 +630,7 @@ class RestfulServer_Item { $funcName = $request('Relation'); $relation = $this->item->$funcName(); - if($relation instanceof DataObjectSet) return new RestfulServer_List($relation); + if($relation instanceof SS_List) return new RestfulServer_List($relation); else return new RestfulServer_Item($relation); } } diff --git a/api/SapphireSoapServer.php b/api/SapphireSoapServer.php index df6945b78..8bb6265b3 100644 --- a/api/SapphireSoapServer.php +++ b/api/SapphireSoapServer.php @@ -45,7 +45,7 @@ class SapphireSoapServer extends Controller { } /** - * @return DataObjectSet Collection of ArrayData elements describing + * @return SS_List Collection of ArrayData elements describing * the method (keys: 'Name', 'Arguments', 'ReturnType') */ function Methods() { diff --git a/api/XMLDataFormatter.php b/api/XMLDataFormatter.php index dd49e930a..ca5b1a590 100644 --- a/api/XMLDataFormatter.php +++ b/api/XMLDataFormatter.php @@ -127,9 +127,9 @@ class XMLDataFormatter extends DataFormatter { } /** - * Generate an XML representation of the given {@link DataObjectSet}. + * Generate an XML representation of the given {@link SS_List}. * - * @param DataObjectSet $set + * @param SS_List $set * @return String XML */ public function convertDataObjectSet(SS_List $set, $fields = null) { diff --git a/core/PaginatedList.php b/core/PaginatedList.php index 6d85822e5..f6fe65f0b 100644 --- a/core/PaginatedList.php +++ b/core/PaginatedList.php @@ -162,7 +162,7 @@ class PaginatedList extends SS_ListDecorator { * around the current page. * * @param int $max - * @return DataObjectSet + * @return SS_List */ public function Pages($max = null) { $result = new ArrayList(); @@ -229,7 +229,7 @@ class PaginatedList extends SS_ListDecorator { * @param int $context The number of pages to display around the current * page. The number should be event, as half the number of each pages * are displayed on either side of the current one. - * @return DataObjectSet + * @return SS_List */ public function PaginationSummary($context = 4) { $result = new ArrayList(); diff --git a/dev/BulkLoader.php b/dev/BulkLoader.php index e63771120..1b6fa1e93 100644 --- a/dev/BulkLoader.php +++ b/dev/BulkLoader.php @@ -326,24 +326,24 @@ class BulkLoader_Result extends Object { * Returns all created objects. Each object might * contain specific importer feedback in the "_BulkLoaderMessage" property. * - * @return DataObjectSet + * @return ArrayList */ public function Created() { - return $this->mapToDataObjectSet($this->created); + return $this->mapToArrayList($this->created); } /** - * @return DataObjectSet + * @return ArrayList */ public function Updated() { - return $this->mapToDataObjectSet($this->updated); + return $this->mapToArrayList($this->updated); } /** - * @return DataObjectSet + * @return ArrayList */ public function Deleted() { - return $this->mapToDataObjectSet($this->deleted); + return $this->mapToArrayList($this->deleted); } /** @@ -396,9 +396,9 @@ class BulkLoader_Result extends Object { /** * @param $arr Array containing ID and ClassName maps - * @return DataObjectSet + * @return ArrayList */ - protected function mapToDataObjectSet($arr) { + protected function mapToArrayList($arr) { $set = new ArrayList(); foreach($arr as $arrItem) { $obj = DataObject::get_by_id($arrItem['ClassName'], $arrItem['ID']); diff --git a/dev/SapphireTest.php b/dev/SapphireTest.php index 6c6798af3..dab997cd4 100644 --- a/dev/SapphireTest.php +++ b/dev/SapphireTest.php @@ -513,12 +513,12 @@ class SapphireTest extends PHPUnit_Framework_TestCase { /** - * Assert that the given {@link DataObjectSet} includes DataObjects matching the given key-value + * Assert that the given {@link SS_List} includes DataObjects matching the given key-value * pairs. Each match must correspond to 1 distinct record. * * @param $matches The patterns to match. Each pattern is a map of key-value pairs. You can * either pass a single pattern or an array of patterns. - * @param $dataObjectSet The {@link DataObjectSet} to test. + * @param $dataObjectSet The {@link SS_List} to test. * * Examples * -------- @@ -550,8 +550,8 @@ class SapphireTest extends PHPUnit_Framework_TestCase { // We couldn't find a match - assertion failed if(!$matched) { throw new PHPUnit_Framework_AssertionFailedError( - "Failed asserting that the DataObjectSet contains an item matching " - . var_export($match, true) . "\n\nIn the following DataObjectSet:\n" + "Failed asserting that the SS_List contains an item matching " + . var_export($match, true) . "\n\nIn the following SS_List:\n" . $this->DOSSummaryForMatch($dataObjectSet, $match) ); } @@ -560,12 +560,12 @@ class SapphireTest extends PHPUnit_Framework_TestCase { } /** - * Assert that the given {@link DataObjectSet} includes only DataObjects matching the given + * Assert that the given {@link SS_List} includes only DataObjects matching the given * key-value pairs. Each match must correspond to 1 distinct record. * * @param $matches The patterns to match. Each pattern is a map of key-value pairs. You can * either pass a single pattern or an array of patterns. - * @param $dataObjectSet The {@link DataObjectSet} to test. + * @param $dataObjectSet The {@link SS_List} to test. * * Example * -------- @@ -596,8 +596,8 @@ class SapphireTest extends PHPUnit_Framework_TestCase { // We couldn't find a match - assertion failed if(!$matched) { throw new PHPUnit_Framework_AssertionFailedError( - "Failed asserting that the DataObjectSet contains an item matching " - . var_export($match, true) . "\n\nIn the following DataObjectSet:\n" + "Failed asserting that the SS_List contains an item matching " + . var_export($match, true) . "\n\nIn the following SS_List:\n" . $this->DOSSummaryForMatch($dataObjectSet, $match) ); } @@ -607,18 +607,18 @@ class SapphireTest extends PHPUnit_Framework_TestCase { if($extracted) { // If we didn't break by this point then we couldn't find a match throw new PHPUnit_Framework_AssertionFailedError( - "Failed asserting that the DataObjectSet contained only the given items, the " + "Failed asserting that the SS_List contained only the given items, the " . "following items were left over:\n" . var_export($extracted, true) ); } } /** - * Assert that the every record in the given {@link DataObjectSet} matches the given key-value + * Assert that the every record in the given {@link SS_List} matches the given key-value * pairs. * * @param $match The pattern to match. The pattern is a map of key-value pairs. - * @param $dataObjectSet The {@link DataObjectSet} to test. + * @param $dataObjectSet The {@link SS_List} to test. * * Example * -------- diff --git a/forms/CheckboxSetField.php b/forms/CheckboxSetField.php index ef5a1635e..86eeaceb6 100644 --- a/forms/CheckboxSetField.php +++ b/forms/CheckboxSetField.php @@ -25,7 +25,7 @@ * * If the field name matches a database field, a comma-separated list of values will be saved to that field. The keys can be text or numbers. * * @todo Document the different source data that can be used - * with this form field - e.g ComponentSet, DataObjectSet, + * with this form field - e.g ComponentSet, ArrayList, * array. Is it also appropriate to accept so many different * types of data when just using an array would be appropriate? * @@ -46,7 +46,7 @@ class CheckboxSetField extends OptionsetField { /** * @todo Explain different source data that can be used with this field, - * e.g. SQLMap, DataObjectSet or an array. + * e.g. SQLMap, ArrayList or an array. * * @todo Should use CheckboxField FieldHolder rather than constructing own markup. */ @@ -76,7 +76,7 @@ class CheckboxSetField extends OptionsetField { $items = $values; } else { // Source and values are DataObject sets. - if($values && is_a($values, 'DataObjectSet')) { + if($values && is_a($values, 'SS_List')) { foreach($values as $object) { if(is_a($object, 'DataObject')) { $items[] = $object->ID; @@ -88,8 +88,8 @@ class CheckboxSetField extends OptionsetField { } } } else { - // Sometimes we pass a singluar default value thats ! an array && !DataObjectSet - if(is_a($values, 'DataObjectSet') || is_array($values)) { + // Sometimes we pass a singluar default value thats ! an array && !SS_List + if(is_a($values, 'SS_List') || is_array($values)) { $items = $values; } else { $items = explode(',', $values); @@ -247,7 +247,7 @@ class CheckboxSetField extends OptionsetField { if($items) { // Items is a DO Set - if(is_a($items, 'DataObjectSet')) { + if(is_a($items, 'SS_List')) { foreach($items as $item) { $data[] = $item->Title; } @@ -264,7 +264,7 @@ class CheckboxSetField extends OptionsetField { $data[] = $item['Title']; } elseif(is_array($this->source) && !empty($this->source[$item])) { $data[] = $this->source[$item]; - } elseif(is_a($this->source, 'DataObjectSet')) { + } elseif(is_a($this->source, 'SS_List')) { $data[] = $sourceTitles[$item]; } else { $data[] = $item; diff --git a/forms/ComplexTableField.php b/forms/ComplexTableField.php index 5294e4bb1..f7697c557 100644 --- a/forms/ComplexTableField.php +++ b/forms/ComplexTableField.php @@ -245,7 +245,7 @@ JS; } /** - * @return DataObjectSet + * @return SS_List */ function Items() { $sourceItems = $this->sourceItems(); @@ -709,7 +709,7 @@ class ComplexTableField_ItemRequest extends TableListField_ItemRequest { /** * Method handles pagination in asset popup. * - * @return Object DataObjectSet + * @return Object SS_List */ function Pagination() { diff --git a/forms/TableField.php b/forms/TableField.php index b30d702bf..3480e8b56 100644 --- a/forms/TableField.php +++ b/forms/TableField.php @@ -116,7 +116,7 @@ class TableField extends TableListField { /** * Displays the headings on the template * - * @return DataObjectSet + * @return SS_List */ function Headings() { $i=0; @@ -147,7 +147,7 @@ class TableField extends TableListField { * it generates the rows from array data instead. * Used in the formfield template to iterate over each row. * - * @return DataObjectSet Collection of {@link TableField_Item} + * @return SS_List Collection of {@link TableField_Item} */ function Items() { // holds TableField_Item instances @@ -341,7 +341,7 @@ class TableField extends TableListField { * Called on save, it creates the appropriate objects and writes them * to the database. * - * @param DataObjectSet $dataObjects + * @param SS_List $dataObjects * @param boolean $existingValues If set to TRUE, it tries to find existing objects * based on the database IDs passed as array keys in $dataObjects parameter. * If set to FALSE, it will always create new object (default: TRUE) diff --git a/forms/TableListField.php b/forms/TableListField.php index c4d730a0a..c00cde642 100644 --- a/forms/TableListField.php +++ b/forms/TableListField.php @@ -266,7 +266,7 @@ class TableListField extends FormField { function sourceClass() { $list = $this->getDataList(); if(method_exists($list, 'dataClass')) return $list->dataClass(); - // Failover for DataObjectSet + // Failover for SS_List else return get_class($list->First()); } @@ -364,7 +364,7 @@ JS * Dummy function to get number of actions originally generated in * TableListField_Item. * - * @return DataObjectSet + * @return SS_List */ function Actions() { $allowedActions = new ArrayList(); @@ -396,10 +396,10 @@ JS user_error('TableList::setCustomSourceItems() deprecated, just pass the items into the constructor', E_USER_WARNING); // The type-hinting above doesn't seem to work consistently - if($items instanceof DataObjectSet) { + if($items instanceof SS_List) { $this->dataList = $items; } else { - user_error('TableList::setCustomSourceItems() should be passed a DataObjectSet', E_USER_WARNING); + user_error('TableList::setCustomSourceItems() should be passed a SS_List', E_USER_WARNING); } } @@ -407,10 +407,10 @@ JS * Get items, with sort & limit applied */ function sourceItems() { - // get items (this may actually be a DataObjectSet) + // get items (this may actually be a SS_List) $items = clone $this->getDataList(); - // TODO: Sorting could be implemented on regular DataObjectSets. + // TODO: Sorting could be implemented on regular SS_Lists. if(method_exists($items,'canSortBy') && isset($_REQUEST['ctf'][$this->Name()]['sort'])) { $sort = $_REQUEST['ctf'][$this->Name()]['sort']; // TODO: sort direction @@ -434,7 +434,7 @@ JS } /** - * Return a DataObjectSet of TableListField_Item objects, suitable for display in the template. + * Return a SS_List of TableListField_Item objects, suitable for display in the template. */ function Items() { $fieldItems = new ArrayList(); @@ -586,7 +586,7 @@ JS } /** - * @param DataObjectSet $items Only used to pass grouped sourceItems for creating + * @param SS_List $items Only used to pass grouped sourceItems for creating * partial summaries. */ function SummaryFields($items = null) { @@ -1275,7 +1275,7 @@ JS * Requires {@link Markable()} to return TRUE. * This is only functional with JavaScript enabled. * - * @return DataObjectSet of ArrayData objects + * @return SS_List of ArrayData objects */ function SelectOptions(){ if(!$this->selectOptions) return; @@ -1427,7 +1427,7 @@ class TableListField_Item extends ViewableData { * See TableListField->Action for a similiar dummy-function to work * around template-inheritance issues. * - * @return DataObjectSet + * @return SS_List */ function Actions() { $allowedActions = new ArrayList(); diff --git a/model/DataDifferencer.php b/model/DataDifferencer.php index 4ef11b516..6e4bf13fa 100644 --- a/model/DataDifferencer.php +++ b/model/DataDifferencer.php @@ -131,7 +131,7 @@ class DataDifferencer extends ViewableData { } /** - * Get a DataObjectSet of the changed fields. + * Get a SS_List of the changed fields. * Each element is an array data containing * - Name: The field name * - Title: The human-readable field title diff --git a/model/DataList.php b/model/DataList.php index 8b4df8834..73c5a3359 100644 --- a/model/DataList.php +++ b/model/DataList.php @@ -10,7 +10,7 @@ class DataList extends ViewableData implements SS_List { protected $dataClass; /** - * The {@link DataQuery} object responsible for getting this DataObjectSet's records + * The {@link DataQuery} object responsible for getting this DataList's records */ protected $dataQuery; @@ -178,9 +178,9 @@ class DataList extends ViewableData implements SS_List { } /** - * Returns an Iterator for this DataObjectSet. - * This function allows you to use DataObjectSets in foreach loops - * @return DataObjectSet_Iterator + * Returns an Iterator for this DataList. + * This function allows you to use DataLists in foreach loops + * @return ArrayIterator */ public function getIterator() { return new ArrayIterator($this->toArray()); diff --git a/model/Hierarchy.php b/model/Hierarchy.php index 55af6e1f4..4bebe312a 100644 --- a/model/Hierarchy.php +++ b/model/Hierarchy.php @@ -394,7 +394,7 @@ class Hierarchy extends DataExtension { /** * Get the children for this DataObject. - * @return DataObjectSet + * @return SS_List */ public function Children() { if(!(isset($this->_cache_children) && $this->_cache_children)) { @@ -413,7 +413,7 @@ class Hierarchy extends DataExtension { /** * Return all children, including those 'not in menus'. - * @return DataObjectSet + * @return SS_List */ public function AllChildren() { return $this->owner->stageChildren(true); @@ -425,7 +425,7 @@ class Hierarchy extends DataExtension { * Added children will be marked as "AddedToStage" * Modified children will be marked as "ModifiedOnStage" * Everything else has "SameOnStage" set, as an indicator that this information has been looked up. - * @return DataObjectSet + * @return SS_List */ public function AllChildrenIncludingDeleted($context = null) { return $this->doAllChildrenIncludingDeleted($context); @@ -435,7 +435,7 @@ class Hierarchy extends DataExtension { * @see AllChildrenIncludingDeleted * * @param unknown_type $context - * @return DataObjectSet + * @return SS_List */ public function doAllChildrenIncludingDeleted($context = null) { if(!$this->owner) user_error('Hierarchy::doAllChildrenIncludingDeleted() called without $this->owner'); @@ -515,7 +515,7 @@ class Hierarchy extends DataExtension { * * @param showAll Inlcude all of the elements, even those not shown in the menus. * (only applicable when extension is applied to {@link SiteTree}). - * @return DataObjectSet + * @return SS_List */ public function stageChildren($showAll = false) { if($this->owner->db('ShowInMenus')) { @@ -540,7 +540,7 @@ class Hierarchy extends DataExtension { * @param boolean $showAll Include all of the elements, even those not shown in the menus. * (only applicable when extension is applied to {@link SiteTree}). * @param boolean $onlyDeletedFromStage Only return items that have been deleted from stage - * @return DataObjectSet + * @return SS_List */ public function liveChildren($showAll = false, $onlyDeletedFromStage = false) { if(!$this->owner->hasExtension('Versioned')) throw new Exception('Hierarchy->liveChildren() only works with Versioned extension applied'); @@ -587,7 +587,7 @@ class Hierarchy extends DataExtension { /** * Return all the parents of this class in a set ordered from the lowest to highest parent. * - * @return DataObjectSet + * @return SS_List */ public function getAncestors() { $ancestors = new ArrayList(); diff --git a/model/SQLMap.php b/model/SQLMap.php index 5e997e788..cbeda009f 100644 --- a/model/SQLMap.php +++ b/model/SQLMap.php @@ -57,7 +57,7 @@ class SQLMap extends Object implements IteratorAggregate { /** * Get the items in this class. - * @return DataObjectSet + * @return SS_List */ public function getItems() { $this->genItems(); diff --git a/model/Versioned.php b/model/Versioned.php index 4989c9a76..a4f7698b1 100644 --- a/model/Versioned.php +++ b/model/Versioned.php @@ -908,8 +908,8 @@ class Versioned extends DataExtension { * @param string $sort A sort expression to be inserted into the ORDER BY clause. * @param string $join A join expression, such as LEFT JOIN or INNER JOIN * @param int $limit A limit on the number of records returned from the database. - * @param string $containerClass The container class for the result set (default is DataObjectSet) - * @return DataObjectSet + * @param string $containerClass The container class for the result set (default is DataList) + * @return SS_List */ static function get_by_stage($class, $stage, $filter = '', $sort = '', $join = '', $limit = '', $containerClass = 'DataList') { $result = DataObject::get($class, $filter, $sort, $join, $limit, $containerClass); diff --git a/parsers/TextParser.php b/parsers/TextParser.php index 867417dca..6c2c8477b 100644 --- a/parsers/TextParser.php +++ b/parsers/TextParser.php @@ -17,7 +17,7 @@ * You should run Covert::raw2xml or whatever is appropriate before using it. * * Optionally (but recommended), is creating a static usable_tags method, - * which will return a DataObjectSet of all the usable tags that can be parsed. + * which will return a SS_List of all the usable tags that can be parsed. * This will (mostly) be used to create helper blocks - telling users what things will be parsed. * Again, @see BBCodeParser for an example of the syntax * diff --git a/search/SearchContext.php b/search/SearchContext.php index e05db8e2d..39d349bf0 100644 --- a/search/SearchContext.php +++ b/search/SearchContext.php @@ -6,7 +6,7 @@ * it just receives a set of search parameters and an object class it acts on. * * The default output of a SearchContext is either a {@link SQLQuery} object -* for further refinement, or a {@link DataObjectSet} that can be used to display +* for further refinement, or a {@link SS_List} that can be used to display * search results, e.g. in a {@link TableListField} instance. * * In case you need multiple contexts, consider namespacing your request parameters @@ -159,7 +159,7 @@ class SearchContext extends Object { * @param array $searchParams * @param string|array $sort * @param string|array $limit - * @return DataObjectSet + * @return SS_List */ public function getResults($searchParams, $sort = false, $limit = false) { $searchParams = array_filter($searchParams, array($this,'clearEmptySearchFields')); diff --git a/security/Member.php b/security/Member.php index 3cc516cc1..aba02e3ab 100644 --- a/security/Member.php +++ b/security/Member.php @@ -717,7 +717,7 @@ class Member extends DataObject { /** * Check if the member is in one of the given groups. * - * @param array|DataObjectSet $groups Collection of {@link Group} DataObjects to check + * @param array|SS_List $groups Collection of {@link Group} DataObjects to check * @param boolean $strict Only determine direct group membership if set to true (Default: false) * @return bool Returns TRUE if the member is in one of the given groups, otherwise FALSE. */ @@ -1001,7 +1001,7 @@ class Member extends DataObject { $groupIDList = array(); - if(is_a($groups, 'DataObjectSet')) { + if(is_a($groups, 'SS_List')) { foreach( $groups as $group ) $groupIDList[] = $group->ID; } elseif(is_array($groups)) { @@ -1047,7 +1047,7 @@ class Member extends DataObject { $groupIDList = array(); - if(is_a($groups, 'DataObjectSet')) { + if(is_a($groups, 'SS_List')) { foreach($groups as $group) { $groupIDList[] = $group->ID; } diff --git a/security/Permission.php b/security/Permission.php index 1ef70dab0..cefd22413 100644 --- a/security/Permission.php +++ b/security/Permission.php @@ -374,7 +374,7 @@ class Permission extends DataObject { * Returns all members for a specific permission. * * @param $code String|array Either a single permission code, or a list of permission codes - * @return DataObjectSet Returns a set of member that have the specified + * @return SS_List Returns a set of member that have the specified * permission. */ public static function get_members_by_permission($code) { @@ -405,7 +405,7 @@ class Permission extends DataObject { /** * Return all of the groups that have one of the given permission codes * @param $codes array|string Either a single permission code, or an array of permission codes - * @return DataObjectSet The matching group objects + * @return SS_List The matching group objects */ static function get_groups_by_permission($codes) { if(!is_array($codes)) $codes = array($codes); diff --git a/security/PermissionCheckboxSetField.php b/security/PermissionCheckboxSetField.php index 334fe14e6..4a25d2b7f 100644 --- a/security/PermissionCheckboxSetField.php +++ b/security/PermissionCheckboxSetField.php @@ -19,7 +19,7 @@ class PermissionCheckboxSetField extends FormField { protected $hiddenPermissions = array(); /** - * @var DataObjectSet + * @var SS_List */ protected $records = null; @@ -33,7 +33,7 @@ class PermissionCheckboxSetField extends FormField { * @param String $title * @param String $managedClass * @param String $filterField - * @param Group|DataObjectSet $records One or more {@link Group} or {@link PermissionRole} records + * @param Group|SS_List $records One or more {@link Group} or {@link PermissionRole} records * used to determine permission checkboxes. * Caution: saveInto() can only be used with a single record, all inherited permissions will be marked readonly. * Setting multiple groups only makes sense in a readonly context. (Optional) @@ -47,7 +47,7 @@ class PermissionCheckboxSetField extends FormField { } elseif($records instanceof Group) { $this->records = new ArrayList(array($records)); } elseif($records) { - throw new InvalidArgumentException('$record should be either a Group record, or a DataObjectSet of Group records'); + throw new InvalidArgumentException('$record should be either a Group record, or a SS_List of Group records'); } // Get all available codes in the system as a categorized nested array diff --git a/tests/forms/ComplexTableFieldTest.php b/tests/forms/ComplexTableFieldTest.php index 68e20272c..37e1d1a30 100644 --- a/tests/forms/ComplexTableFieldTest.php +++ b/tests/forms/ComplexTableFieldTest.php @@ -36,7 +36,7 @@ class ComplexTableFieldTest extends FunctionalTest { $parser = new CSSContentParser($field->FieldHolder()); $this->assertEquals(count($parser->getBySelector('tbody tr')), 2, 'There are 2 players (rows) in the table'); - $this->assertEquals($field->Items()->Count(), 2, 'There are 2 CTF items in the DataObjectSet'); + $this->assertEquals($field->Items()->Count(), 2, 'There are 2 CTF items in the SS_List'); } function testAddingManyManyNewPlayer() { diff --git a/tests/forms/TableListFieldTest.php b/tests/forms/TableListFieldTest.php index dd3129634..dbc8ad09a 100644 --- a/tests/forms/TableListFieldTest.php +++ b/tests/forms/TableListFieldTest.php @@ -294,7 +294,7 @@ class TableListFieldTest extends SapphireTest { } /** - * Check that a DataObjectSet can be passed to TableListField + * Check that a SS_List can be passed to TableListField */ function testDataObjectSet() { $one = new TableListFieldTest_Obj;