cakephp/cakephp — pull request #2443 by markstory (2013-12-07 03:06:48+00:00)
Title: 3.0 controller repository method.

Add the repository method discussed in #2424. I've removed a few things along the way:

* Controller::$modelKey - only used by scaffold which is probably also going to get removed.
* Controller::$uses - Repositories should be loaded with the repository() method now. There is a __get() method to load the convention based repository.
* Shell::$uses - Met a similar fate as Controller::$uses.
* Controller::loadModel() & Shell::loadModel() have been removed and replaced with the repository() method.

I've included a way to add new repository types so the code isn't overly coupled. This hopefully will also make it simple to add new repository types for other datasources.