Extension structure · Question 4 of 12
Which PHP namespace do the controller classes of the extension my_shop with the vendor Acme have?
1 answer is correct. Easy
Show answer
Answer
- C Acme\
MyShop\ Controller
Explanation
Classes of an extension follow the convention Vendor\, with the extension key converted to UpperCamelCase: my_shop becomes MyShop. The file Classes/Controller/ProductController.php therefore contains the class Acme\. This is made possible by the PSR-4 entry in composer.json, such as "Acme\. The namespace TYPO3\ is reserved for core extensions and does not belong in your own extensions; underscores from the extension key are not carried over into the namespace.