Create a basic component (com_test) and then try to use Joomla autoloader using JLoader::registerPrefix('Test', JPATH_COMPONENT) method.
Create a class on the root of that folder called TestController and try to run that component.
What I would expect is that Joomla finds automatically that class. Class name has two parts (Test and Controller), so it should find the class on a file called controller.php placed on the root of the component folder.
Joomla tries to find the class on the next path com_test/controller/controller.php file, which is not there.
Joomla 3.5
If I understand right the way Joomla uses camel case classes is that it splits the name on parts and each part is a folder except from the last one. For example, ClassPart1Part2, if should be on the com_class/part1/part2.php.
If you think this is a bug too, I will provide some code to fix that issue, but I would like to know if someone else finds this a bug for the autoloader class.
Labels |
Added:
?
|
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-03-23 10:39:36 |
Closed_By | ⇒ | brianteeman |
It's a quirk with the autoloader, and one I'm not sure you can fix in a B/C manner. As you found, the path in the actual result is what is expected right now.
If you can address it in a B/C manner, code would surely be appreciated.