Task #40870
closedAdd Utility Functions to retreive Information from Class Names
0%
Description
My intention is to introduce these 2 Utility Functions:
\TYPO3\CMS\Core\Extension\ExtensionManager::getClassNameWithoutVendorAndProduct($className)
\TYPO3\CMS\Core\Extension\ExtensionManager::getExtensionKeyFromClassName($className)
These can be used in the the Autoloader for example (will be a separate patch, when this one is done).
Also Extbase can make use of these functions to resolve #40742.
Files
Updated by Gerrit Code Review about 12 years ago
- Status changed from New to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/14555
Updated by Sebastian Michaelsen about 12 years ago
Just to make the usage more obvious I append the patch for the autoloader (will be subject of another issue).
Updated by Gerrit Code Review about 12 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/14555
Updated by Thomas Maroschik about 12 years ago
Keep in mind that extension keys will change their format in the future.
They will follow the schema {vendor}.{product} where the product can be divided further by dots. By that it get's easy to distinguish for the autoloader if the class is in a known extension or in a subpackage of an extension. Core extensions currently are subproducts in the form {vendor}.{product}.{subproduct} (eg TYPO3.CMS.Form), but this is hardcoded as the current extension keys don't support the dot notation yet.
Example:
FLOW3 is using a package called "Symfony.Component.Yaml". Their autoloader knows that the class Symfony\Component\Yaml\Parser has to be in the Symfony.Component.Yaml package. So with a list of loaded package names their autoloader knows where the vendor and product name ends and the class name starts.
We're looking forward to support that for 6.1 too to allow further integration of the two projects.
Updated by Ernesto Baschny over 11 years ago
- Status changed from Under Review to Closed
- Priority changed from Should have to Won't have this time
Abandoned by author