J4.x

Convenzioni Namespace in Joomla 4

From Joomla! Documentation

This page is a translated version of the page J4.x:Namespace Conventions In Joomla and the translation is 16% complete.

Outdated translations are marked like this.
Other languages:
Deutsch • ‎English • ‎français • ‎italiano • ‎Türkçe
Joomla! 
4.0

Base Namespaces

Le convenzioni di denominazione raccomandate in Joomla 4 sono le seguenti:

Componenti Core

Componenti di terze parti
  • Joomla\Component\<ComponentName>\<ClientName>
    • Joomla\Component\Content\Site
    • Joomla\Component\Content\Administrator
Posizioni di esempio
  • <CompanyName>\<ComponentName>\<ClientName>
    • Acme\Backup\Site
    • Acme\Backup\Administrator
Moduli core

Joomla\Component\Content\Site\Controller
components/com_content/Controller/ArticleController.php

Joomla\Component\Content\Administrator\Controller
administrator/components/com_content/Controller/ArticlesController.php

Moduli di terze parti
Posizioni di esempio
  • Joomla\Module\<ModuleName>\<ClientName>
    • Joomla\Module\UsersLatest\Site
    • Joomla\Module\Quickicon\Administrator

Core Plugins

  • <CompanyName>\Module\<ModuleName>\<ClientName>
    • Acme\Module\SubscriptionStatus\Site
    • Acme\Module\LastBackupStatus\Administrator

Plugins di terze parti

Joomla\Module\Quickicon\Administrator\Dispatcher
administrator/modules/mod_quickicon/Dispatcher/Dispatcher.php

Joomla\Module\UsersLatest\Site\Helper
modules/mod_users_latest/Helper/UsersLatestHelper.php

Posizioni di esempio

Joomla Framework Library

  • Joomla\Plugin\<PluginGroup>\<PluginName>
    • Joomla\Plugin\System\Debug
    • Joomla\Plugin\Quickicon\Joomlaupdate

Biblioteca del CMS Joomla

  • <CompanyName>\Plugin\<PluginGroup>\<PluginName>\
    • Acme\Plugin\System\BackupOnDemand
Posizioni di esempio

Joomla\Plugin\System\Debug
plugins/system/debug/DataFormatter.php

Joomla\Plugin\Quickicon\Joomlaupdate\Extension
plugins/quickicon/joomlaupdate/Extension/Joomlaupdate.php

Framework

Joomla Framework Library

  • Joomla
    • Joomla\Session
    • Joomla\Image

Joomla CMS Library

  • Joomla\CMS
    • Joomla\CMS\Mail
    • Joomla\CMS\MVC

Example locations

Joomla\Session
libraries/vendor/joomla/session/src/Session.php

Joomla\CMS\Mail
libraries/src/Mail/Mail.php