Skip to content
Permalink
Browse files

Rename Associations class to AssociationCollection

  • Loading branch information...
bcrowe committed Jul 22, 2014
1 parent 0f7e7ea commit bad2e1e3d30983922216f80da742c30440e7c46d
@@ -25,7 +25,7 @@
* Contains methods for managing associations, and
* ordering operations around saving and deleting.
*/
class Associations {
class AssociationCollection {
use AssociationsNormalizerTrait;
@@ -23,7 +23,7 @@
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 @@ public function __construct(array $config = []) {
}
$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 @@ public function association($name) {
/**
* Get the associations collection for this table.
*
* @return \Cake\ORM\Associations
* @return \Cake\ORM\AssociationCollection
*/
public function associations() {
return $this->_associations;
@@ -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();
}
/**

0 comments on commit bad2e1e

Please sign in to comment.
You can’t perform that action at this time.