File names

The file name describes the functionality included in the file. It consists of one or more nouns, written in UpperCamelCase. For example in the frontend system extension there is the file ContentObject/ContentObjectRenderer.php.

It is recommended to use only PHP classes and avoid non-class files.

Files that contain PHP interfaces must have the file name end on "Interface", e.g. FileListEditIconHookInterface.php.

For information on class names for user files, see the according section of this document.

One file can contain only one class or interface.

Extension for PHP files is always php.

Unit test files

Unit test files are located in the "Tests/Unit/" folder in the according extension, within a sub-structure matching the structure in the Classes/ folder.

The naming conventions for the files are different from those explained above: "Test" is appended at the end of the name, before ".php".

Example

The unit test class file for typo3/sysext/core/Classes/Database/PreparedStatement.php is:

typo3/sysext/core/Tests/Unit/Database/PreparedStatementTest.php

See more about unit testing in the "Unit tests" chapter.