J4.x

Conventions d'espace de nommage dans Joomla

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

Espaces de noms de base

Les conventions d'appellation recommandées dans Joomla 4 sont les suivantes :

Composants natifs

Composants tiers
  • Joomla\Component\<ComponentName>\<ClientName>
    • Joomla\Component\Content\Site
    • Joomla\Component\Content\Administrator
Exemples d'emplacement
  • <CompanyName>\Component\<ComponentName>\<ClientName>
    • Acme\Component\Backup\Site
    • Acme\Component\Backup\Administrator


Modules natifs

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

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

Modules tiers
Exemples d'emplacement
  • Joomla\Module\<ModuleName>\<ClientName>
    • Joomla\Module\UsersLatest\Site
    • Joomla\Module\Quickicon\Administrator

Plugins natifs

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

Plugins tiers

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

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

Exemples d'emplacement

Bibliothèque Joomla Framework

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

Bibliothèque Joomla CMS

  • <CompanyName>\Plugin\<PluginGroup>\<PluginName>\
    • Acme\Plugin\System\BackupOnDemand
Exemples d'emplacement

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