# Namespaces in der Dokumentation

**URL:** <https://forum.shopware.com/t/namespaces-in-der-dokumentation/98532>\
**Category:** Shopware 6 (German)\
**Tags:** programming\
**Created:** [14. Februar 2023 um 11:14 UTC](https://forum.shopware.com/t/namespaces-in-der-dokumentation/98532 "2023-02-14T11:14:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![daslicht](https://avatars.discourse-cdn.com/v4/letter/d/b5ac83/32.png) [@daslicht](https://forum.shopware.com/u/daslicht)\
**Post date:** [14. Februar 2023 um 11:14 UTC](https://forum.shopware.com/t/namespaces-in-der-dokumentation/98532/1 "2023-02-14T11:14:26Z")

</div>

Hallo,  
in der Dokumentation finden wirr folgendes:

Sollte der Namespace hier nicht  
` SwagBasicExample`  
anstelle von  
`Swag\BasicExample`  
sein?

Andere Plugins folgen dem letzteren, zB::

```auto
SwagExtensionStore\Controller

```

Oder ist beides zulässig?  
~Marc

---

<div class="post-metadata">

**Author:** ![Max\_Shop](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@Max\_Shop](https://forum.shopware.com/u/Max_Shop)\
**Post date:** [14. Februar 2023 um 11:44 UTC](https://forum.shopware.com/t/namespaces-in-der-dokumentation/98532/2 "2023-02-14T11:44:44Z")

</div>

Prinzipiell kannst du Namespaces benennen, wie du möchtest. Sie müssen lediglich (Shopware weit) eindeutig/konfliktfrei sein.

Der Pluginordner muss/sollte immer im Sinne von SwagBasicExample benannt sein, da du nicht mehrere Plugins innerhalb von Swag speichern könntest. Aber selbst innerhalb dieses Ordners ist es möglich Swag\BasicExample als Namespace zu verwenden. Dafür gibt es schließlich die composer.json mit Shopware-plugin-class.

Mehrheitlich überwiegt vermutlich die SwagBasicExample Schreibweise.

---

<div class="post-metadata">

**Author:** ![daslicht](https://avatars.discourse-cdn.com/v4/letter/d/b5ac83/32.png) [@daslicht](https://forum.shopware.com/u/daslicht)\
**Post date:** [14. Februar 2023 um 11:50 UTC](https://forum.shopware.com/t/namespaces-in-der-dokumentation/98532/3 "2023-02-14T11:50:33Z")

</div>

Dankeschön fürs Zeit nehmen und Erklären. ❤
