---
title: "Namespaces and class names of user files"
manual: "TYPO3 Explained"
version: "12.4"
permalink: "https://docs.typo3.org/permalink/t3coreapi:cgl-namespaces-class-names@12.4"
source: "CodingGuidelines/CodingBestPractices/ClassNamesOfUserFiles.rst"
rendered: "2026-10-21T15:29:37+00:00"
---

> [!WARNING]
> **Attention**
>
> TYPO3 v12 has reached end-of-life as of April 30th 2026 and
> is no longer being maintained. Use the version switcher on the top
> left of this page to select documentation for a supported version of TYPO3.
>
> Need more time before upgrading?
> You can purchase Extended Long Term Support (ELTS) for TYPO3 v12 here:
> [TYPO3 ELTS](https://typo3.com/services/extended-support-elts).

# Namespaces and class names of user files {#cgl-namespaces-class-names}

The namespace and class names of user files follow the same rules as
class names of the TYPO3 Core files do.

The namespace declaration of each user file should show where the file
belongs inside its extension. The namespace starts with
`"VendorMyNamespace"`, where "Vendor" is your vendor name and
"MyNamespace" is the extension name in UpperCamelCase. Then follows the
name of the subfolder of `Classes/`, in which the file is located
(if any). E.g. the file
[`EXT:realurl/Classes/Controller/AliasesController.php`](../../ExtensionArchitecture/FileStructure/Classes/Index.md#file-extension-classes-controller-somecontroller-php)
with the class `AliasesController` is in the namespace
"`\DmitryDulepov\Realurl\Controller`".

User files with these class names are commonly found in the directory
[vendor/](https://docs.typo3.org/permalink/t3coreapi:directory-vendor@12.4).
