コード例 #1
0
if (!defined('FLOW3_PATH_ROOT')) {
    exit('FLOW3: No root path defined in environment variable FLOW3_ROOTPATH (Error #1248964376)' . PHP_EOL);
}
if (!isset($_SERVER['FLOW3_WEBPATH']) || !is_dir($_SERVER['FLOW3_WEBPATH'])) {
    exit('FLOW3: No web path defined in environment variable FLOW3_WEBPATH or directory does not exist (Error #1249046843)' . PHP_EOL);
}
define('FLOW3_PATH_WEB', \F3\FLOW3\Utility\Files::getUnixStylePath(realpath($_SERVER['FLOW3_WEBPATH'])) . '/');
define('FLOW3_PATH_CONFIGURATION', FLOW3_PATH_ROOT . 'Configuration/');
define('FLOW3_PATH_DATA', FLOW3_PATH_ROOT . 'Data/');
define('FLOW3_PATH_PACKAGES', FLOW3_PATH_ROOT . 'Packages/');
echo "\nFLOW3 1.0.0 alpha 7 class names migration script.\n\nThis script scans PHP, YAML and XML files of all installed packages for\noccurrences of class and interface names which have been changed for\nFLOW3 1.0.0 alpha 7 and replaces them by the new names.\n\n";
$classNameReplacementMap = array('F3\\FLOW3\\AOP\\Exception\\CircularPointcutReference' => 'F3\\FLOW3\\AOP\\Exception\\CircularPointcutReferenceException', 'F3\\FLOW3\\AOP\\Exception\\InvalidArgument' => 'F3\\FLOW3\\AOP\\Exception\\InvalidArgumentException', 'F3\\FLOW3\\AOP\\Exception\\InvalidConstructorSignature' => 'F3\\FLOW3\\AOP\\Exception\\InvalidConstructorSignatureException', 'F3\\FLOW3\\AOP\\Exception\\InvalidPointcutExpression' => 'F3\\FLOW3\\AOP\\Exception\\InvalidPointcutExpressionException', 'F3\\FLOW3\\AOP\\Exception\\InvalidTargetClass' => 'F3\\FLOW3\\AOP\\Exception\\InvalidTargetClassException', 'F3\\FLOW3\\AOP\\Exception\\UnknowClass' => 'F3\\FLOW3\\AOP\\Exception\\UnknowClassException', 'F3\\FLOW3\\AOP\\Exception\\UnknownPointcut' => 'F3\\FLOW3\\AOP\\Exception\\UnknownPointcutException', 'F3\\FLOW3\\Cache\\Controller\\ManagerController' => 'F3\\FLOW3\\Cache\\Controller\\CacheManagerController', 'F3\\FLOW3\\Cache\\Exception\\ClassAlreadyLoaded' => 'F3\\FLOW3\\Cache\\Exception\\ClassAlreadyLoadedException', 'F3\\FLOW3\\Cache\\Exception\\DuplicateIdentifier' => 'F3\\FLOW3\\Cache\\Exception\\DuplicateIdentifierException', 'F3\\FLOW3\\Cache\\Exception\\InvalidBackend' => 'F3\\FLOW3\\Cache\\Exception\\InvalidBackendException', 'F3\\FLOW3\\Cache\\Exception\\InvalidCache' => 'F3\\FLOW3\\Cache\\Exception\\InvalidCacheException', 'F3\\FLOW3\\Cache\\Exception\\InvalidData' => 'F3\\FLOW3\\Cache\\Exception\\InvalidDataException', 'F3\\FLOW3\\Cache\\Exception\\NoSuchCache' => 'F3\\FLOW3\\Cache\\Exception\\NoSuchCacheException', 'F3\\FLOW3\\Cache\\Factory' => 'F3\\FLOW3\\Cache\\CacheFactory', 'F3\\FLOW3\\Cache\\Manager' => 'F3\\FLOW3\\Cache\\CacheManager', 'F3\\FLOW3\\Configuration\\Exception\\ContainerIsLocked' => 'F3\\FLOW3\\Configuration\\Exception\\ContainerIsLockedException', 'F3\\FLOW3\\Configuration\\Exception\\InvalidConfigurationType' => 'F3\\FLOW3\\Configuration\\Exception\\InvalidConfigurationTypeException', 'F3\\FLOW3\\Configuration\\Exception\\NoSuchFile' => 'F3\\FLOW3\\Configuration\\Exception\\NoSuchFileException', 'F3\\FLOW3\\Configuration\\Exception\\NoSuchOption' => 'F3\\FLOW3\\Configuration\\Exception\\NoSuchOptionException', 'F3\\FLOW3\\Configuration\\Exception\\ParseError' => 'F3\\FLOW3\\Configuration\\Exception\\ParseErrorException', 'F3\\FLOW3\\Configuration\\Source\\YAMLSource' => 'F3\\FLOW3\\Configuration\\Source\\YamlSource', 'F3\\FLOW3\\Configuration\\Manager' => 'F3\\FLOW3\\Configuration\\ConfigurationManager', 'F3\\FLOW3\\Locale\\Exception\\InvalidLocaleIdentifier' => 'F3\\FLOW3\\Locale\\Exception\\InvalidLocaleIdentifierException', 'F3\\FLOW3\\Log\\Exception\\CouldNotOpenResource' => 'F3\\FLOW3\\Log\\Exception\\CouldNotOpenResourceException', 'F3\\FLOW3\\Log\\Exception\\InvalidBackend' => 'F3\\FLOW3\\Log\\Exception\\InvalidBackendException', 'F3\\FLOW3\\Log\\Exception\\NoSuchBackend' => 'F3\\FLOW3\\Log\\Exception\\NoSuchBackendException', 'F3\\FLOW3\\MVC\\Controller\\ControllerContext' => 'F3\\FLOW3\\MVC\\Controller\\Context', 'F3\\FLOW3\\MVC\\Controller\\ControllerInterface' => 'F3\\FLOW3\\MVC\\Controller\\ControllerInterface', 'F3\\FLOW3\\MVC\\Controller\\Exception\\InactivePackage' => 'F3\\FLOW3\\MVC\\Controller\\Exception\\InactivePackageException', 'F3\\FLOW3\\MVC\\Controller\\Exception\\InvalidController' => 'F3\\FLOW3\\MVC\\Controller\\Exception\\InvalidControllerException', 'F3\\FLOW3\\MVC\\Controller\\Exception\\InvalidPackage' => 'F3\\FLOW3\\MVC\\Controller\\Exception\\InvalidPackageException', 'F3\\FLOW3\\MVC\\Exception\\InfiniteLoop' => 'F3\\FLOW3\\MVC\\Exception\\InfiniteLoopException', 'F3\\FLOW3\\MVC\\Exception\\InvalidActionName' => 'F3\\FLOW3\\MVC\\Exception\\InvalidActionNameException', 'F3\\FLOW3\\MVC\\Exception\\InvalidArgumentName' => 'F3\\FLOW3\\MVC\\Exception\\InvalidArgumentNameException', 'F3\\FLOW3\\MVC\\Exception\\InvalidArgumentType' => 'F3\\FLOW3\\MVC\\Exception\\InvalidArgumentTypeException', 'F3\\FLOW3\\MVC\\Exception\\InvalidArgumentValue' => 'F3\\FLOW3\\MVC\\Exception\\InvalidArgumentValueException', 'F3\\FLOW3\\MVC\\Exception\\InvalidController' => 'F3\\FLOW3\\MVC\\Exception\\InvalidControllerException', 'F3\\FLOW3\\MVC\\Exception\\InvalidControllerName' => 'F3\\FLOW3\\MVC\\Exception\\InvalidControllerNameException', 'F3\\FLOW3\\MVC\\Exception\\InvalidFormat' => 'F3\\FLOW3\\MVC\\Exception\\InvalidFormatException', 'F3\\FLOW3\\MVC\\Exception\\InvalidMarker' => 'F3\\FLOW3\\MVC\\Exception\\InvalidMarkerException', 'F3\\FLOW3\\MVC\\Exception\\InvalidOrMissingRequestHash' => 'F3\\FLOW3\\MVC\\Exception\\InvalidOrMissingRequestHashException', 'F3\\FLOW3\\MVC\\Exception\\InvalidPackageKey' => 'F3\\FLOW3\\MVC\\Exception\\InvalidPackageKeyException', 'F3\\FLOW3\\MVC\\Exception\\InvalidPart' => 'F3\\FLOW3\\MVC\\Exception\\InvalidPartException', 'F3\\FLOW3\\MVC\\Exception\\InvalidRequestMethod' => 'F3\\FLOW3\\MVC\\Exception\\InvalidRequestMethodException', 'F3\\FLOW3\\MVC\\Exception\\InvalidRequestType' => 'F3\\FLOW3\\MVC\\Exception\\InvalidRequestTypeException', 'F3\\FLOW3\\MVC\\Exception\\InvalidRoutePartHandler' => 'F3\\FLOW3\\MVC\\Exception\\InvalidRoutePartHandlerException', 'F3\\FLOW3\\MVC\\Exception\\InvalidTemplateResource' => 'F3\\FLOW3\\MVC\\Exception\\InvalidTemplateResourceException', 'F3\\FLOW3\\MVC\\Exception\\InvalidUriPattern' => 'F3\\FLOW3\\MVC\\Exception\\InvalidUriPatternException', 'F3\\FLOW3\\MVC\\Exception\\NoSuchAction' => 'F3\\FLOW3\\MVC\\Exception\\NoSuchActionException', 'F3\\FLOW3\\MVC\\Exception\\NoSuchArgument' => 'F3\\FLOW3\\MVC\\Exception\\NoSuchArgumentException', 'F3\\FLOW3\\MVC\\Exception\\NoSuchController' => 'F3\\FLOW3\\MVC\\Exception\\NoSuchControllerException', 'F3\\FLOW3\\MVC\\Exception\\StopAction' => 'F3\\FLOW3\\MVC\\Exception\\StopActionException', 'F3\\FLOW3\\MVC\\Exception\\UnsupportedRequestType' => 'F3\\FLOW3\\MVC\\Exception\\UnsupportedRequestTypeException', 'F3\\FLOW3\\Object\\Builder' => 'F3\\FLOW3\\Object\\ObjectBuilder', 'F3\\FLOW3\\Object\\Exception\\CannotBuildObject' => 'F3\\FLOW3\\Object\\Exception\\CannotBuildObjectException', 'F3\\FLOW3\\Object\\Exception\\CannotReconstituteObject' => 'F3\\FLOW3\\Object\\Exception\\CannotReconstituteObjectException', 'F3\\FLOW3\\Object\\Exception\\InvalidClass' => 'F3\\FLOW3\\Object\\Exception\\InvalidClassException', 'F3\\FLOW3\\Object\\Exception\\InvalidObject' => 'F3\\FLOW3\\Object\\Exception\\InvalidObjectException', 'F3\\FLOW3\\Object\\Exception\\InvalidObjectConfiguration' => 'F3\\FLOW3\\Object\\Exception\\InvalidObjectConfigurationException', 'F3\\FLOW3\\Object\\Exception\\InvalidObjectName' => 'F3\\FLOW3\\Object\\Exception\\InvalidObjectNameException', 'F3\\FLOW3\\Object\\Exception\\ObjectAlreadyRegistered' => 'F3\\FLOW3\\Object\\Exception\\ObjectAlreadyRegisteredException', 'F3\\FLOW3\\Object\\Exception\\UnknownClass' => 'F3\\FLOW3\\Object\\Exception\\UnknownClassException', 'F3\\FLOW3\\Object\\Exception\\UnknownInterface' => 'F3\\FLOW3\\Object\\Exception\\UnknownInterfaceException', 'F3\\FLOW3\\Object\\Exception\\UnknownObject' => 'F3\\FLOW3\\Object\\Exception\\UnknownObjectException', 'F3\\FLOW3\\Object\\Exception\\UnresolvedDependencies' => 'F3\\FLOW3\\Object\\Exception\\UnresolvedDependenciesException', 'F3\\FLOW3\\Object\\Exception\\WrongScope' => 'F3\\FLOW3\\Object\\Exception\\WrongScopeException', 'F3\\FLOW3\\Object\\Factory' => 'F3\\FLOW3\\Object\\ObjectFactory', 'F3\\FLOW3\\Object\\FactoryInterface' => 'F3\\FLOW3\\Object\\ObjectFactoryInterface', 'F3\\FLOW3\\Object\\Manager' => 'F3\\FLOW3\\Object\\ObjectManager', 'F3\\FLOW3\\Object\\ManagerInterface' => 'F3\\FLOW3\\Object\\ObjectManagerInterface', 'F3\\FLOW3\\Object\\RegistryInterface' => 'F3\\FLOW3\\Object\\RegistryInterface', 'F3\\FLOW3\\Object\\SessionRegistry' => 'F3\\FLOW3\\Object\\SessionRegistry', 'F3\\FLOW3\\Object\\TransientRegistry' => 'F3\\FLOW3\\Object\\TransientRegistry', 'F3\\FLOW3\\Package\\Controller\\ManagerController' => 'F3\\FLOW3\\Package\\Controller\\PackageManagerController', 'F3\\FLOW3\\Package\\Exception\\DuplicatePackage' => 'F3\\FLOW3\\Package\\Exception\\DuplicatePackageException', 'F3\\FLOW3\\Package\\Exception\\InvalidPackageKey' => 'F3\\FLOW3\\Package\\Exception\\InvalidPackageKeyException', 'F3\\FLOW3\\Package\\Exception\\InvalidPackagePath' => 'F3\\FLOW3\\Package\\Exception\\InvalidPackagePathException', 'F3\\FLOW3\\Package\\Exception\\InvalidPackageState' => 'F3\\FLOW3\\Package\\Exception\\InvalidPackageStateException', 'F3\\FLOW3\\Package\\Exception\\PackageKeyAlreadyExists' => 'F3\\FLOW3\\Package\\Exception\\PackageKeyAlreadyExistsException', 'F3\\FLOW3\\Package\\Exception\\ProtectedPackageKey' => 'F3\\FLOW3\\Package\\Exception\\ProtectedPackageKeyException', 'F3\\FLOW3\\Package\\Exception\\UnknownPackage' => 'F3\\FLOW3\\Package\\Exception\\UnknownPackageException', 'F3\\FLOW3\\Package\\Manager' => 'F3\\FLOW3\\Package\\PackageManager', 'F3\\FLOW3\\Package\\ManagerInterface' => 'F3\\FLOW3\\Package\\PackageManagerInterface', 'F3\\FLOW3\\Persistence\\Aspect\\DirtyMonitoring' => 'F3\\FLOW3\\Persistence\\Aspect\\DirtyMonitoringAspect', 'F3\\FLOW3\\Persistence\\Exception\\IllegalObjectType' => 'F3\\FLOW3\\Persistence\\Exception\\IllegalObjectTypeException', 'F3\\FLOW3\\Persistence\\Exception\\MissingBackend' => 'F3\\FLOW3\\Persistence\\Exception\\MissingBackendException', 'F3\\FLOW3\\Persistence\\Exception\\TooDirty' => 'F3\\FLOW3\\Persistence\\Exception\\TooDirtyException', 'F3\\FLOW3\\Persistence\\Exception\\UnexpectedType' => 'F3\\FLOW3\\Persistence\\Exception\\UnexpectedTypeException', 'F3\\FLOW3\\Persistence\\Exception\\UnknownObject' => 'F3\\FLOW3\\Persistence\\Exception\\UnknownObjectException', 'F3\\FLOW3\\Persistence\\Manager' => 'F3\\FLOW3\\Persistence\\PersistenceManager', 'F3\\FLOW3\\Persistence\\ManagerInterface' => 'F3\\FLOW3\\Persistence\\PersistenceManagerInterface', 'F3\\FLOW3\\Property\\Exception\\FormatNotSupported' => 'F3\\FLOW3\\Property\\Exception\\FormatNotSupportedException', 'F3\\FLOW3\\Property\\Exception\\InvalidDataType' => 'F3\\FLOW3\\Property\\Exception\\InvalidDataTypeException', 'F3\\FLOW3\\Property\\Exception\\InvalidFormat' => 'F3\\FLOW3\\Property\\Exception\\InvalidFormatException', 'F3\\FLOW3\\Property\\Exception\\InvalidProperty' => 'F3\\FLOW3\\Property\\Exception\\InvalidPropertyException', 'F3\\FLOW3\\Property\\Exception\\InvalidSource' => 'F3\\FLOW3\\Property\\Exception\\InvalidSourceException', 'F3\\FLOW3\\Property\\Exception\\InvalidTarget' => 'F3\\FLOW3\\Property\\Exception\\InvalidTargetException', 'F3\\FLOW3\\Property\\Exception\\TargetNotFound' => 'F3\\FLOW3\\Property\\Exception\\TargetNotFoundException', 'F3\\FLOW3\\Reflection\\Exception\\InvalidPropertyType' => 'F3\\FLOW3\\Reflection\\Exception\\InvalidPropertyTypeException', 'F3\\FLOW3\\Reflection\\Exception\\UnknownClass' => 'F3\\FLOW3\\Reflection\\Exception\\UnknownClassException', 'F3\\FLOW3\\Reflection\\Service' => 'F3\\FLOW3\\Reflection\\ReflectionService', 'F3\\FLOW3\\Security\\Authentication\\ManagerInterface' => 'F3\\FLOW3\\Security\\Authentication\\AuthenticationManagerInterface', 'F3\\FLOW3\\Security\\Authentication\\Provider\\UsernamePasswordCR' => 'F3\\FLOW3\\Security\\Authentication\\Provider\\PersistedUsernamePasswordProvider', 'F3\\FLOW3\\Security\\Authentication\\ProviderInterface' => 'F3\\FLOW3\\Security\\Authentication\\AuthenticationProviderInterface', 'F3\\FLOW3\\Security\\Authentication\\ProviderManager' => 'F3\\FLOW3\\Security\\Authentication\\AuthenticationProviderManager', 'F3\\FLOW3\\Security\\Authentication\\ProviderResolver' => 'F3\\FLOW3\\Security\\Authentication\\AuthenticationProviderResolver', 'F3\\FLOW3\\Security\\Authorization\\Voter\\ACL' => 'F3\\FLOW3\\Security\\Authorization\\Voter\\AclVoter', 'F3\\FLOW3\\Security\\Channel\\HTTPSInterceptor' => 'F3\\FLOW3\\Security\\Channel\\HttpsInterceptor', 'F3\\FLOW3\\Security\\Channel\\RequestHashService' => 'F3\\FLOW3\\Security\\Channel\\RequestHashService', 'F3\\FLOW3\\Security\\Cryptography\\OpenSSLRSAKey' => 'F3\\FLOW3\\Security\\Cryptography\\OpenSslRsaKey', 'F3\\FLOW3\\Security\\Cryptography\\RSAWalletServiceInterface' => 'F3\\FLOW3\\Security\\Cryptography\\RsaWalletServiceInterface', 'F3\\FLOW3\\Security\\Cryptography\\RSAWalletServicePHP' => 'F3\\FLOW3\\Security\\Cryptography\\RsaWalletServicePhp', 'F3\\FLOW3\\Security\\Exception\\AccessDenied' => 'F3\\FLOW3\\Security\\Exception\\AccessDeniedException', 'F3\\FLOW3\\Security\\Exception\\AuthenticationRequired' => 'F3\\FLOW3\\Security\\Exception\\AuthenticationRequiredException', 'F3\\FLOW3\\Security\\Exception\\CircularResourceDefinitionDetected' => 'F3\\FLOW3\\Security\\Exception\\CircularResourceDefinitionDetectedException', 'F3\\FLOW3\\Security\\Exception\\DecryptionNotAllowed' => 'F3\\FLOW3\\Security\\Exception\\DecryptionNotAllowedException', 'F3\\FLOW3\\Security\\Exception\\InvalidArgumentForHashGeneration' => 'F3\\FLOW3\\Security\\Exception\\InvalidArgumentForHashGenerationException', 'F3\\FLOW3\\Security\\Exception\\InvalidArgumentForRequestHashGeneration' => 'F3\\FLOW3\\Security\\Exception\\InvalidArgumentForRequestHashGenerationException', 'F3\\FLOW3\\Security\\Exception\\InvalidAuthenticationProvider' => 'F3\\FLOW3\\Security\\Exception\\InvalidAuthenticationProviderException', 'F3\\FLOW3\\Security\\Exception\\InvalidAuthenticationStatus' => 'F3\\FLOW3\\Security\\Exception\\InvalidAuthenticationStatusException', 'F3\\FLOW3\\Security\\Exception\\InvalidKeyPairID' => 'F3\\FLOW3\\Security\\Exception\\InvalidKeyPairIdException', 'F3\\FLOW3\\Security\\Exception\\MissingConfiguration' => 'F3\\FLOW3\\Security\\Exception\\MissingConfigurationException', 'F3\\FLOW3\\Security\\Exception\\NoAuthenticationProviderFound' => 'F3\\FLOW3\\Security\\Exception\\NoAuthenticationProviderFoundException', 'F3\\FLOW3\\Security\\Exception\\NoContextAvailable' => 'F3\\FLOW3\\Security\\Exception\\NoContextAvailableException', 'F3\\FLOW3\\Security\\Exception\\NoEntryInPolicy' => 'F3\\FLOW3\\Security\\Exception\\NoEntryInPolicyException', 'F3\\FLOW3\\Security\\Exception\\NoEntryPointFound' => 'F3\\FLOW3\\Security\\Exception\\NoEntryPointFoundException', 'F3\\FLOW3\\Security\\Exception\\NoInterceptorFound' => 'F3\\FLOW3\\Security\\Exception\\NoInterceptorFoundException', 'F3\\FLOW3\\Security\\Exception\\NoRequestPatternFound' => 'F3\\FLOW3\\Security\\Exception\\NoRequestPatternFoundException', 'F3\\FLOW3\\Security\\Exception\\OperationNotPermitted' => 'F3\\FLOW3\\Security\\Exception\\OperationNotPermittedException', 'F3\\FLOW3\\Security\\Exception\\RequestTypeNotSupported' => 'F3\\FLOW3\\Security\\Exception\\RequestTypeNotSupportedException', 'F3\\FLOW3\\Security\\Exception\\SyntacticallyWrongRequestHash' => 'F3\\FLOW3\\Security\\Exception\\SyntacticallyWrongRequestHashException', 'F3\\FLOW3\\Security\\Exception\\UnsupportedAuthenticationToken' => 'F3\\FLOW3\\Security\\Exception\\UnsupportedAuthenticationTokenException', 'F3\\FLOW3\\Security\\Exception\\VoterNotFound' => 'F3\\FLOW3\\Security\\Exception\\VoterNotFoundException', 'F3\\FLOW3\\Session\\Exception\\DataNotSerializeable' => 'F3\\FLOW3\\Session\\Exception\\DataNotSerializeableException', 'F3\\FLOW3\\Session\\Exception\\SessionAutostartIsEnabled' => 'F3\\FLOW3\\Session\\Exception\\SessionAutostartIsEnabledException', 'F3\\FLOW3\\Session\\Exception\\SessionNotStarted' => 'F3\\FLOW3\\Session\\Exception\\SessionNotStartedException', 'F3\\FLOW3\\Session\\PHPSession' => 'F3\\FLOW3\\Session\\PhpSession', 'F3\\FLOW3\\SignalSlot\\Exception\\InvalidSlot' => 'F3\\FLOW3\\SignalSlot\\Exception\\InvalidSlotException', 'F3\\FLOW3\\Validation\\Exception\\InvalidSubject' => 'F3\\FLOW3\\Validation\\Exception\\InvalidSubjectException', 'F3\\FLOW3\\Validation\\Exception\\InvalidValidationConfiguration' => 'F3\\FLOW3\\Validation\\Exception\\InvalidValidationConfigurationException', 'F3\\FLOW3\\Validation\\Exception\\InvalidValidationOptions' => 'F3\\FLOW3\\Validation\\Exception\\InvalidValidationOptionsException', 'F3\\FLOW3\\Validation\\Exception\\NoSuchFilter' => 'F3\\FLOW3\\Validation\\Exception\\NoSuchFilterException', 'F3\\FLOW3\\Validation\\Exception\\NoSuchValidator' => 'F3\\FLOW3\\Validation\\Exception\\NoSuchValidatorException', 'F3\\FLOW3\\Validation\\Validator\\UUIDValidator' => 'F3\\FLOW3\\Validation\\Validator\\UuidValidator', 'F3\\FLOW3\\Private\\AOP\\AOPProxyClassTemplate' => 'F3\\FLOW3\\Private\\AOP\\AopProxyClassTemplate', 'F3\\Fluid\\View\\Exception\\InvalidTemplateResource' => 'F3\\Fluid\\View\\Exception\\InvalidTemplateResourceException', 'F3\\Testing\\Controller\\CLIController' => 'F3\\Testing\\Controller\\CliController', 'F3\\TYPO3CR\\Storage\\Backend\\PDO' => 'F3\\TYPO3CR\\Storage\\Backend\\Pdo', 'F3\\TYPO3CR\\Storage\\Search\\PDO' => 'F3\\TYPO3CR\\Storage\\Search\\Pdo', 'F3\\YAML\\YAML' => 'F3\\YAML\\Yaml');
$phpFiles = \F3\FLOW3\Utility\Files::readDirectoryRecursively(FLOW3_PATH_PACKAGES, '.php', TRUE);
$yamlFiles = \F3\FLOW3\Utility\Files::readDirectoryRecursively(FLOW3_PATH_PACKAGES, '.yaml', TRUE);
$xmlFiles = \F3\FLOW3\Utility\Files::readDirectoryRecursively(FLOW3_PATH_PACKAGES, '.xml', TRUE);
$configurationFiles = \F3\FLOW3\Utility\Files::readDirectoryRecursively(FLOW3_PATH_CONFIGURATION, '.yaml', TRUE);
$allPathsAndFilenames = array_merge($phpFiles, $yamlFiles, $xmlFiles, $configurationFiles);
foreach ($allPathsAndFilenames as $pathAndFilename) {
    $pathInfo = pathinfo($pathAndFilename);
    if (!isset($pathInfo['filename'])) {
        continue;
    }
    if (strpos($pathAndFilename, 'Packages/Framework/') !== FALSE) {
        continue;
    }
    if ($pathAndFilename === __FILE__) {
        continue;
    }
    $file = file_get_contents($pathAndFilename);
    $fileBackup = $file;
    foreach ($classNameReplacementMap as $oldClassName => $newClassName) {
コード例 #2
0
 /**
  * Recursively publishes static resources located in the specified directory.
  * These resources are typically public package resources provided by the active packages.
  *
  * @param string $sourcePath The full path to the source directory which should be published (includes sub directories)
  * @param string $relativeTargetPath Path relative to the target's root where resources should be published to.
  * @return boolean TRUE if publication succeeded or FALSE if the resources could not be published
  */
 public function publishStaticResources($sourcePath, $relativeTargetPath)
 {
     if (!is_dir($sourcePath)) {
         return FALSE;
     }
     $targetPath = \F3\FLOW3\Utility\Files::concatenatePaths(array($this->resourcesPublishingPath . 'Static/', $relativeTargetPath));
     foreach (\F3\FLOW3\Utility\Files::readDirectoryRecursively($sourcePath) as $sourcePathAndFilename) {
         if (substr(strtolower($sourcePathAndFilename), -4, 4) === '.php') {
             continue;
         }
         $targetPathAndFilename = \F3\FLOW3\Utility\Files::concatenatePaths(array($targetPath, str_replace($sourcePath, '', $sourcePathAndFilename)));
         if (!file_exists($targetPathAndFilename) || filemtime($sourcePathAndFilename) > filemtime($targetPathAndFilename)) {
             $this->mirrorFile($sourcePathAndFilename, $targetPathAndFilename, TRUE);
         }
     }
     return TRUE;
 }
コード例 #3
0
 /**
  * Detects changes of the files and directories to be monitored and emits signals
  * accordingly.
  *
  * @return void
  * @author Robert Lemke <*****@*****.**>
  * @api
  */
 public function detectChanges()
 {
     $changedFiles = array();
     $changedDirectories = array();
     $changedFiles = $this->detectChangedFiles($this->monitoredFiles);
     foreach ($this->monitoredDirectories as $path) {
         if (!isset($this->directoriesAndFiles[$path])) {
             $this->directoriesAndFiles[$path] = \F3\FLOW3\Utility\Files::readDirectoryRecursively($path);
             $this->directoriesChanged = TRUE;
             $changedDirectories[$path] = \F3\FLOW3\Monitor\ChangeDetectionStrategy\ChangeDetectionStrategyInterface::STATUS_CREATED;
         }
     }
     foreach ($this->directoriesAndFiles as $path => $pathAndFilenames) {
         if (!is_dir($path)) {
             unset($this->directoriesAndFiles[$path]);
             $this->directoriesChanged = TRUE;
             $changedDirectories[$path] = \F3\FLOW3\Monitor\ChangeDetectionStrategy\ChangeDetectionStrategyInterface::STATUS_DELETED;
         } else {
             $currentSubDirectoriesAndFiles = \F3\FLOW3\Utility\Files::readDirectoryRecursively($path);
             if ($currentSubDirectoriesAndFiles != $pathAndFilenames) {
                 $pathAndFilenames = array_unique(array_merge($currentSubDirectoriesAndFiles, $pathAndFilenames));
             }
             $changedFiles = array_merge($changedFiles, $this->detectChangedFiles($pathAndFilenames));
         }
     }
     if (count($changedFiles) > 0) {
         $this->emitFilesHaveChanged($this->identifier, $changedFiles);
     }
     if (count($changedDirectories) > 0) {
         $this->emitDirectoriesHaveChanged($this->identifier, $changedDirectories);
     }
     if (count($changedFiles) > 0 || count($changedDirectories) > 0) {
         $this->systemLogger->log(sprintf('File Monitor detected %s changed files and %s changed directories.', count($changedFiles), count($changedDirectories)), LOG_INFO);
     }
 }