.. _Environment-getPsr4Prefixes: ============================================== Environment::getPsr4Prefixes() ============================================== \\nn\\t3::Environment()->getPsr4Prefixes(); ---------------------------------------------- Return list of PSR4 prefixes. This is an array with all folders that must be parsed by class when autoloading / bootstrapping TYPO3 have to be parsed. In a TYPO3 extension, this is the ``Classes`` folder by default. The list is generated by Composer/TYPO3. An array is returned. Key is ``Vendor\Namespace\``, Value is an array with paths to the folders, which are searched recursively for classes. It does not matter whether TYPO3 is running in composer mode or not. .. code-block:: php \nn\t3::Environment()->getPsr4Prefixes(); Example for return: .. code-block:: php [ 'Nng\Nnhelpers\' => ['/path/to/composer/../../public/typo3conf/ext/nnhelpers/Classes', ...], 'Nng\Nnrestapi\' => ['/path/to/composer/../../public/typo3conf/ext/nnrestapi/Classes', ...] ] | ``@return array`` Source Code ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: php public function getPsr4Prefixes() { $composerClassLoader = ClassLoadingInformation::getClassLoader(); $psr4prefixes = $composerClassLoader->getPrefixesPsr4(); return $psr4prefixes; }