Hi, guys.

I pretend to load and initialize a component (e.g.
SomethingComponent), so I use something like:
ClassRegistry::init('Plugin.Something', 'Component')

The problem is that as in the line 140 of the file class-registry
(http://api.cakephp.org/view_source/class-registry/#line-99) we have
  if (class_exists($class) || App::import($type, $pluginPath .
$class)) {
      ${$class} =& new $class($settings);

We'll I think this block of code is not considering the naming
convetions of CakePHP and it should be something like:
  if (class_exists($class) || App::import($type, $pluginPath .
$class)) {
      if (in_array($type, array('Behavior', 'Component',
'Controller'))){
        $class .= $type;
      }
      ${$class} =& new $class($settings);

Am I right or should I use it in a different way?

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to