Skip to content

Commit

Permalink
Start to remove now dead classes.
Browse files Browse the repository at this point in the history
* Model & ClassRegistry have been replaced by the new ORM.
* Old non-functioning behaviors have been removed. We can forward port
  behaviors as people have time to fix them.
* DbAcl & the AclShell rely on the old Model class - which has been removed.
* Scaffold relies on the old Model and needs to be rethought.
* Parts of bake have been neutered, they relied on Model which is now
  gone.
  • Loading branch information
markstory committed Dec 16, 2013
1 parent cd6b607 commit db1f1a1
Show file tree
Hide file tree
Showing 79 changed files with 57 additions and 44,626 deletions.
615 changes: 0 additions & 615 deletions Cake/Console/Command/AclShell.php

This file was deleted.

6 changes: 3 additions & 3 deletions Cake/Console/Command/Task/TestTask.php
Expand Up @@ -21,7 +21,7 @@
use Cake\Core\Configure;
use Cake\Core\Plugin;
use Cake\Error;
use Cake\Utility\ClassRegistry;
use Cake\ORM\TableRegistry;
use Cake\Utility\Inflector;

/**
Expand Down Expand Up @@ -287,10 +287,10 @@ public function isLoadableClass($package, $class) {
* @return object And instance of the class that is going to be tested.
*/
public function buildTestSubject($type, $class) {
ClassRegistry::flush();
TableRegistry::clear();
$class = $this->getRealClassName($type, $class);
if (strtolower($type) === 'model') {
$instance = ClassRegistry::init($class);
$instance = TableRegistry::get($class);
} else {
$instance = new $class();
}
Expand Down
164 changes: 0 additions & 164 deletions Cake/Controller/Component/Acl/DbAcl.php

This file was deleted.

11 changes: 0 additions & 11 deletions Cake/Controller/Controller.php
Expand Up @@ -27,7 +27,6 @@
use Cake\ORM\TableRegistry;
use Cake\Routing\RequestActionTrait;
use Cake\Routing\Router;
use Cake\Utility\ClassRegistry;
use Cake\Utility\Inflector;
use Cake\Utility\MergeVariablesTrait;
use Cake\Utility\RepositoryAwareTrait;
Expand Down Expand Up @@ -657,16 +656,6 @@ public function render($view = null, $layout = null) {

$this->View = $this->_getViewObject();

$models = ClassRegistry::keys();
foreach ($models as $currentModel) {
$currentObject = ClassRegistry::getObject($currentModel);
if ($currentObject instanceof \Cake\Model\Model) {
$className = get_class($currentObject);
$this->request->params['models'][$currentObject->alias] = compact('className');
$this->View->validationErrors[$currentObject->alias] =& $currentObject->validationErrors;
}
}

$this->autoRender = false;
$this->response->body($this->View->render($view, $layout));
return $this->response;
Expand Down

0 comments on commit db1f1a1

Please sign in to comment.