Joomla命名空间与实际文件的对应关系

zhangzhijun 2025-03-08 14:18:47 170次浏览 170个评论

Components​ 'Joomla\Component\<Component name>\Administrator\' points to administrator/components/com_<component name>/src 'Joomla\Component\<Component name>\Site\' points to components/com_<component name>/src 'Joomla\Component\<Component name>\Api\' points to api/c...

Components

'Joomla\Component\<Component name>\Administrator\' points to administrator/components/com_<component name>/src

'Joomla\Component\<Component name>\Site\' points to components/com_<component name>/src

'Joomla\Component\<Component name>\Api\' points to api/components/com_<component name>/src

eg 'Joomla\Component\Content\Administrator' points to administrator/components/com_content/src

Modules

'Joomla\Module\<Module name>\Administrator\' points to administrator/modules/mod_<module name>/src

'Joomla\Module\<Module name>\Site\' points to modules/mod_<module name>/src

eg 'Joomla\Module\Login\Site' points to modules/mod_login/src

Plugins

'Joomla\Plugin\<Plugin type>\<Plugin name>\' points to plugins/<plugin type>/<plugin name>/src

eg 'Joomla\Plugin\Fields\Calendar' points to plugins/fields/calendar/src

Library Classes

'Joomla\CMS' points to libraries/src. Note that these are the classes which are described in the API docs on the Joomla CMS side.

'Joomla\SomethingElse' points to libraries/vendor/somethingelse/src.

eg 'Joomla\Event' points to libraries/vendor/event/src

If a library classname doesn't start with 'Joomla' then it's going to be found in one of the other directories under libraries/vendor/.

版权申明:

本博客所有文章除特别声明外均采用BY-NC-SA 4.0许可协议。依据BY-NC-SA 4.0许可协议,转载请附上原文出处链接及本声明。

原文链接: https://chahuawu.com/index.php/computer-technology/web-development/joomla-namespace-yu-shiji-wenjian-duiying-guanxi.html