Skip to content

Commit ac5673c

Browse files
added joomla namespace page
1 parent 69a64e5 commit ac5673c

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed
File renamed without changes.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
sidebar_position: 1
3+
title: Joomla Namespace Prefixes
4+
---
5+
# Joomla Namespace Prefixes
6+
7+
Joomla holds namespace prefixes and their mapping to the position in the file system for the following:
8+
9+
## Components
10+
`'Joomla\Component\<Component name>\Administrator\'` points to `administrator/components/com_<component name>/src`
11+
12+
`'Joomla\Component\<Component name>\Site\'` points to `components/com_<component name>/src`
13+
14+
`'Joomla\Component\<Component name>\Api\'` points to `api/components/com_<component name>/src`
15+
16+
eg 'Joomla\Component\Content\Administrator\' points to administrator/components/com_content/src
17+
18+
## Modules
19+
`'Joomla\Module\<Module name>\Administrator\'` points to `administrator/modules/mod_<module name>/src`
20+
21+
`'Joomla\Module\<Module name>\Site\'` points to `modules/mod_<module name>/src`
22+
23+
eg 'Joomla\Module\Login\Site\' points to modules/mod_login/src
24+
25+
## Plugins
26+
`'Joomla\Plugin\<Plugin type>\<Plugin name>\'` points to `plugins/<plugin type>/<plugin name>/src`
27+
28+
eg 'Joomla\Plugin\Fields\Calendar' points to plugins/fields/calendar/src
29+
30+
## Library Classes
31+
'Joomla\CMS\' points to libraries/src
32+
33+
'Joomla\SomethingElse\' points to libraries/vendor/somethingelse/src
34+
35+
eg 'Joomla\Event\' points to libraries/vendor/event/src
36+
37+
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/.
38+
39+
(Note that all the above is the general standard for Joomla code – you might however find the odd exception).
40+
41+
If you look in administrator/cache/autoload_psr4.php you'll see all the namespace prefixes for Joomla component, modules and plugins, together with the associated position in the file system (and also the namespace prefixes of any installed extensions).

0 commit comments

Comments
 (0)