PHP 클래스 Neos\Flow\Core\Migrations\AbstractMigration

파일 보기 프로젝트 열기: neos/flow-development-collection 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$migrationsManager Manager
$notes array
$operations array
$sourcePackageKey string
$targetPackageData array
$warnings array

공개 메소드들

메소드 설명
__construct ( Manager $manager, string $packageKey )
execute ( ) : void
getDescription ( ) : string Returns the first line of the migration class doc comment
getIdentifier ( ) : string Returns the identifier of this migration, e.g. 'Neos.Flow-20120126163610'.
getNotes ( ) : array
getSourcePackageKey ( ) : string Returns the package key this migration comes from.
getVersionNumber ( ) : string Returns the version of this migration, e.g. '20120126163610'.
getWarnings ( ) : array
hasNotes ( ) : boolean
hasWarnings ( ) : boolean
prepare ( array $targetPackageData ) : void Resets internal state and sets the target package data.
up ( ) : void Anything that needs to be done in the migration when migrating into the "up" direction needs to go into this method.

보호된 메소드들

메소드 설명
applyFileOperations ( ) : void Applies all registered moveFile operations.
applySearchAndReplaceOperations ( ) : void Applies all registered searchAndReplace operations.
deleteFile ( string $pathAndFileName ) : void Delete a file.
moveFile ( string $oldPath, string $newPath ) : void Move a file (or directory) from $oldPath to $newPath.
moveSettingsPaths ( string $sourcePath, string $destinationPath ) Move a settings path from "source" to "destination"; best to be used when package names change.
processConfiguration ( string $configurationType, Closure $processor, boolean $saveResult = false ) : void Apply the given processor to the raw results of loading the given configuration type for the package from YAML. If multiple files exist (context configuration) all are processed independently.
renameClass ( string $oldName, string $newName ) : void Rename a class from $oldName to $newName.
renameMethod ( string $className, string $oldMethodName, string $newMethodName, boolean $withInheritance = true ) : void Rename a class method.
searchAndReplace ( string $search, string $replacement, array | string $filter = ['php', 'yaml', 'html'] ) : void Does a simple search and replace on all (textual) files. The filter array can be used to give file extensions to limit the operation to.
searchAndReplaceRegex ( string $search, string | Closure $replacement, array | string $filter = ['php', 'yaml', 'html'] ) : void Does a regex search and replace on all (textual) files. The filter array can be used to give file extensions to limit the operation to.
showNote ( string $note ) : void This can be used to show a note to the developer.
showWarning ( string $warning ) : void This can be used to show a warning to the developer.

메소드 상세

__construct() 공개 메소드

public __construct ( Manager $manager, string $packageKey )
$manager Manager
$packageKey string

applyFileOperations() 보호된 메소드

Applies all registered moveFile operations.
protected applyFileOperations ( ) : void
리턴 void

applySearchAndReplaceOperations() 보호된 메소드

Applies all registered searchAndReplace operations.
protected applySearchAndReplaceOperations ( ) : void
리턴 void

deleteFile() 보호된 메소드

Delete a file.
protected deleteFile ( string $pathAndFileName ) : void
$pathAndFileName string
리턴 void

execute() 공개 메소드

public execute ( ) : void
리턴 void

getDescription() 공개 메소드

Returns the first line of the migration class doc comment
public getDescription ( ) : string
리턴 string

getIdentifier() 추상적인 공개 메소드

Returns the identifier of this migration, e.g. 'Neos.Flow-20120126163610'.
abstract public getIdentifier ( ) : string
리턴 string

getNotes() 공개 메소드

public getNotes ( ) : array
리턴 array

getSourcePackageKey() 공개 메소드

Returns the package key this migration comes from.
public getSourcePackageKey ( ) : string
리턴 string

getVersionNumber() 공개 메소드

Returns the version of this migration, e.g. '20120126163610'.
public getVersionNumber ( ) : string
리턴 string

getWarnings() 공개 메소드

public getWarnings ( ) : array
리턴 array

hasNotes() 공개 메소드

public hasNotes ( ) : boolean
리턴 boolean

hasWarnings() 공개 메소드

public hasWarnings ( ) : boolean
리턴 boolean

moveFile() 보호된 메소드

If $oldPath ends with a * everything starting with $oldPath will be moved into $newPath (which then is created as a directory, if it does not yet exist).
protected moveFile ( string $oldPath, string $newPath ) : void
$oldPath string
$newPath string
리턴 void

moveSettingsPaths() 보호된 메소드

Move a settings path from "source" to "destination"; best to be used when package names change.
protected moveSettingsPaths ( string $sourcePath, string $destinationPath )
$sourcePath string
$destinationPath string

prepare() 공개 메소드

Resets internal state and sets the target package data.
public prepare ( array $targetPackageData ) : void
$targetPackageData array
리턴 void

processConfiguration() 보호된 메소드

Apply the given processor to the raw results of loading the given configuration type for the package from YAML. If multiple files exist (context configuration) all are processed independently.
protected processConfiguration ( string $configurationType, Closure $processor, boolean $saveResult = false ) : void
$configurationType string One of ConfigurationManager::CONFIGURATION_TYPE_*
$processor Closure
$saveResult boolean
리턴 void

renameClass() 보호된 메소드

This expects fully qualified class names, so proper refactoring can be done.
protected renameClass ( string $oldName, string $newName ) : void
$oldName string
$newName string
리턴 void

renameMethod() 보호된 메소드

This expects a fully qualified class name, so proper refactoring can be done.
protected renameMethod ( string $className, string $oldMethodName, string $newMethodName, boolean $withInheritance = true ) : void
$className string the class that contains the method to be renamed
$oldMethodName string the method to be renamed
$newMethodName string the new method name
$withInheritance boolean if true, also rename method on child classes
리턴 void

searchAndReplace() 보호된 메소드

Does a simple search and replace on all (textual) files. The filter array can be used to give file extensions to limit the operation to.
protected searchAndReplace ( string $search, string $replacement, array | string $filter = ['php', 'yaml', 'html'] ) : void
$search string
$replacement string
$filter array | string either an array with file extensions to consider or the full path to a single file to process
리턴 void

searchAndReplaceRegex() 보호된 메소드

The patterns are used as is, no quoting is done. A closure can be given for the $replacement variable. It should return a string and is given an array of matches as parameter.
protected searchAndReplaceRegex ( string $search, string | Closure $replacement, array | string $filter = ['php', 'yaml', 'html'] ) : void
$search string
$replacement string | Closure
$filter array | string either an array with file extensions to consider or the full path to a single file to process
리턴 void

showNote() 보호된 메소드

If changes cannot be automated or something needs to be adjusted manually for other reasons, leave a note for the developer. The notes will be shown together after migrations have been run.
또한 보기: showWarning
protected showNote ( string $note ) : void
$note string
리턴 void

showWarning() 보호된 메소드

Similar to showNote, but the output is given a stronger emphasis. The warnings will be shown together after migrations have been run.
또한 보기: showNote
protected showWarning ( string $warning ) : void
$warning string
리턴 void

up() 추상적인 공개 메소드

It will be called by the Manager upon migration.
abstract public up ( ) : void
리턴 void

프로퍼티 상세

$migrationsManager 보호되어 있는 프로퍼티

protected Manager,Neos\Flow\Core\Migrations $migrationsManager
리턴 Manager

$notes 보호되어 있는 프로퍼티

protected array $notes
리턴 array

$operations 보호되어 있는 프로퍼티

protected array $operations
리턴 array

$sourcePackageKey 보호되어 있는 프로퍼티

protected string $sourcePackageKey
리턴 string

$targetPackageData 보호되어 있는 프로퍼티

protected array $targetPackageData
리턴 array

$warnings 보호되어 있는 프로퍼티

protected array $warnings
리턴 array