Changeset 406


Ignore:
Timestamp:
08/09/10 09:29:09 (11 years ago)
Author:
sander
Message:

Use ClassRegistry::init instead of new so that behaviors work in a console

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/server/www/cake/console/libs/console.php

    r310 r406  
    6565                        $class = Inflector::camelize(r('.php', '', $model)); 
    6666                        $this->models[$model] = $class; 
    67                         $this->{$class} = new $class(); 
     67                        $this->{$class} = ClassRegistry::init($class); 
    6868                } 
    6969                $this->out('Model classes:'); 
Note: See TracChangeset for help on using the changeset viewer.