ClassNamingUtility
Several functions related to naming and conversions of names such as translation between Repository and Model names or exploding an objectControllerName into pieces
Table of Contents
Methods
- explodeObjectControllerName() : array<string|int, string>
- Explodes a controllerObjectName like \Vendor\Ext\Controller\FooController into several pieces like vendorName, extensionName, subpackageKey and controllerName
- translateModelNameToRepositoryName() : string
- Translates a model name to an appropriate repository name e.g. Tx_Extbase_Domain_Model_Foo to Tx_Extbase_Domain_Repository_FooRepository or \TYPO3\CMS\Extbase\Domain\Model\Foo to \TYPO3\CMS\Extbase\Domain\Repository\FooRepository
- translateRepositoryNameToModelName() : class-string
- Translates a repository name to an appropriate model name e.g. Tx_Extbase_Domain_Repository_FooRepository to Tx_Extbase_Domain_Model_Foo or \TYPO3\CMS\Extbase\Domain\Repository\FooRepository to \TYPO3\CMS\Extbase\Domain\Model\Foo
Methods
explodeObjectControllerName()
Explodes a controllerObjectName like \Vendor\Ext\Controller\FooController into several pieces like vendorName, extensionName, subpackageKey and controllerName
public
static explodeObjectControllerName(string $controllerObjectName) : array<string|int, string>
Parameters
- $controllerObjectName : string
-
The controller name to be exploded
Return values
array<string|int, string> —An array of controllerObjectName pieces
translateModelNameToRepositoryName()
Translates a model name to an appropriate repository name e.g. Tx_Extbase_Domain_Model_Foo to Tx_Extbase_Domain_Repository_FooRepository or \TYPO3\CMS\Extbase\Domain\Model\Foo to \TYPO3\CMS\Extbase\Domain\Repository\FooRepository
public
static translateModelNameToRepositoryName(string $modelName) : string
Parameters
- $modelName : string
Return values
stringtranslateRepositoryNameToModelName()
Translates a repository name to an appropriate model name e.g. Tx_Extbase_Domain_Repository_FooRepository to Tx_Extbase_Domain_Model_Foo or \TYPO3\CMS\Extbase\Domain\Repository\FooRepository to \TYPO3\CMS\Extbase\Domain\Model\Foo
public
static translateRepositoryNameToModelName(RepositoryInterface> $repositoryName) : class-string
Parameters
- $repositoryName : RepositoryInterface>