2 namespace TYPO3\CMS\Core\Compatibility;
38 'ext_tables_static+adt.sql',
39 'ext_typoscript_constants.txt',
40 'ext_typoscript_setup.txt'
55 $this->
package = $package;
68 $pathSite = PATH_site;
69 $pathSiteLength = strlen($pathSite);
70 $absolutePackagePath = $this->package->getPackagePath();
71 if (substr($absolutePackagePath, 0, $pathSiteLength) === $pathSite) {
72 $relativePackagePathToPathSite = substr($absolutePackagePath, $pathSiteLength);
73 $relativePackagePathToPathSiteSegments = explode(
'/', $relativePackagePathToPathSite);
74 $relativePackagePathToPathTypo3 = null;
77 switch (implode(
'/', array_slice($relativePackagePathToPathSiteSegments, 0, 2))) {
78 case 'typo3conf/Packages':
80 $relativePackagePathToPathTypo3 =
'../typo3conf/Packages/' . implode(
'/', array_slice($relativePackagePathToPathSiteSegments, 2));
84 $relativePackagePathToPathTypo3 =
'../typo3conf/ext/' . implode(
'/', array_slice($relativePackagePathToPathSiteSegments, 2));
86 case TYPO3_mainDir .
'ext':
88 $relativePackagePathToPathTypo3 =
'ext/' . implode(
'/', array_slice($relativePackagePathToPathSiteSegments, 2));
90 case TYPO3_mainDir .
'sysext':
92 $relativePackagePathToPathTypo3 =
'sysext/' . implode(
'/', array_slice($relativePackagePathToPathSiteSegments, 2));
94 case 'typo3temp/test_ext':
96 $relativePackagePathToPathTypo3 =
'../typo3temp/test_ext/' . implode(
'/', array_slice($relativePackagePathToPathSiteSegments, 2));
99 if ($packageType !== null && $relativePackagePathToPathSite !== null && $relativePackagePathToPathTypo3 !== null) {
100 $this->extensionInformation[
'type'] = $packageType;
101 $this->extensionInformation[
'siteRelPath'] = $relativePackagePathToPathSite;
102 $this->extensionInformation[
'typo3RelPath'] = $relativePackagePathToPathTypo3;
114 $this->extensionInformation[
'ext_icon'] = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getExtensionIcon($this->package->getPackagePath());
124 foreach ($this->extensionFilesToCheckFor as $fileName) {
125 $absolutePathToFile = $this->package->getPackagePath() . $fileName;
126 if (@file_exists($absolutePathToFile)) {
127 $this->extensionInformation[$fileName] = $absolutePathToFile;
140 return new \ArrayIterator($this->extensionInformation);
152 return isset($this->extensionInformation[$offset]);
164 return $this->extensionInformation[$offset];
178 throw new \InvalidArgumentException(
'The array $GLOBALS[\'TYPO3_LOADED_EXT\'] may not be modified.', 1361915115);
191 throw new \InvalidArgumentException(
'The array $GLOBALS[\'TYPO3_LOADED_EXT\'] may not be modified.', 1361915206);
202 return serialize($this->extensionInformation);
214 $this->extensionInformation =
unserialize($serialized);
225 return count($this->extensionInformation);
233 return iterator_to_array($this);