Neos\Flow\Core\Migrations\Version20120920111200::up PHP Метод

up() публичный Метод

public up ( ) : void
Результат void
    public function up()
    {
        if (file_exists(Files::concatenatePaths([$this->targetPackageData['path'], 'composer.json']))) {
            $this->showNote('Skipping moving of classes to PSR-0 layout since composer.json already exists.');
            return;
        }
        $packageKeyAsDirectory = str_replace('.', '/', $this->targetPackageData['packageKey']);
        if (!is_dir(Files::concatenatePaths(array($this->targetPackageData['path'], 'Classes', $packageKeyAsDirectory)))) {
            $this->moveFile('Classes/*', 'Classes/' . $packageKeyAsDirectory . '/');
        } else {
            $this->showNote('Skipping moving of classes to PSR-0 layout since the directory "Classes/' . $packageKeyAsDirectory . '" already exists. Make sure to update any other class to the new layout.');
        }
        $this->writeComposerManifest();
        $this->deleteFile('Meta/Package.xml');
        $packageKeyAsNamespace = str_replace('.', '\\', $this->targetPackageData['packageKey']);
        $this->showNote('You may now remove your "' . $packageKeyAsNamespace . '\\Package" class if it does not contain any code.');
    }