Browse Source

Rename Associations class to AssociationCollection

Bryan Crowe 11 years ago
parent
commit
bad2e1e3d3
3 changed files with 10 additions and 10 deletions
  1. 1 1
      src/ORM/Associations.php
  2. 5 5
      src/ORM/Table.php
  3. 4 4
      tests/TestCase/ORM/AssociationsTest.php

+ 1 - 1
src/ORM/Associations.php

@@ -25,7 +25,7 @@ use Cake\ORM\Table;
  * Contains methods for managing associations, and
  * ordering operations around saving and deleting.
  */
-class Associations {
+class AssociationCollection {
 
 	use AssociationsNormalizerTrait;
 

+ 5 - 5
src/ORM/Table.php

@@ -23,7 +23,7 @@ use Cake\Event\Event;
 use Cake\Event\EventListener;
 use Cake\Event\EventManager;
 use Cake\Event\EventManagerTrait;
-use Cake\ORM\Associations;
+use Cake\ORM\AssociationCollection;
 use Cake\ORM\Association\BelongsTo;
 use Cake\ORM\Association\BelongsToMany;
 use Cake\ORM\Association\HasMany;
@@ -140,7 +140,7 @@ class Table implements RepositoryInterface, EventListener {
 /**
  * The associations container for this Table.
  *
- * @var \Cake\ORM\Associations
+ * @var \Cake\ORM\AssociationCollection
  */
 	protected $_associations;
 
@@ -179,7 +179,7 @@ class Table implements RepositoryInterface, EventListener {
  *   passed to it.
  * - eventManager: An instance of an event manager to use for internal events
  * - behaviors: A BehaviorRegistry. Generally not used outside of tests.
- * - associations: An Associations instance.
+ * - associations: An AssociationCollection instance.
  *
  * @param array $config List of options for this table
  */
@@ -211,7 +211,7 @@ class Table implements RepositoryInterface, EventListener {
 		}
 		$this->_eventManager = $eventManager ?: new EventManager();
 		$this->_behaviors = $behaviors ?: new BehaviorRegistry($this);
-		$this->_associations = $associations ?: new Associations();
+		$this->_associations = $associations ?: new AssociationCollection();
 
 		$this->initialize($config);
 		$this->_eventManager->attach($this);
@@ -541,7 +541,7 @@ class Table implements RepositoryInterface, EventListener {
 /**
  * Get the associations collection for this table.
  *
- * @return \Cake\ORM\Associations
+ * @return \Cake\ORM\AssociationCollection
  */
 	public function associations() {
 		return $this->_associations;

+ 4 - 4
tests/TestCase/ORM/AssociationsTest.php

@@ -14,16 +14,16 @@
  */
 namespace Cake\Test\TestCase\ORM;
 
-use Cake\ORM\Associations;
+use Cake\ORM\AssociationCollection;
 use Cake\ORM\Association\BelongsTo;
 use Cake\ORM\Association\BelongsToMany;
 use Cake\ORM\Entity;
 use Cake\TestSuite\TestCase;
 
 /**
- * Associations test case.
+ * AssociationCollection test case.
  */
-class AssociationsTest extends TestCase {
+class AssociationCollectionTest extends TestCase {
 
 /**
  * setup
@@ -32,7 +32,7 @@ class AssociationsTest extends TestCase {
  */
 	public function setUp() {
 		parent::setUp();
-		$this->associations = new Associations();
+		$this->associations = new AssociationCollection();
 	}
 
 /**