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

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

보호된 프로퍼티들

프로퍼티 타입 설명
$currentPackageData array ..)
$eventCallbacks array Callbacks to be invoked when an event is triggered
$ignoredPackageCategories array
$migrations AbstractMigration[]
$packagesData array
$packagesPath string

공개 메소드들

메소드 설명
getCurrentPackageKey ( ) : string
getStatus ( string $packageKey = null, string $versionNumber = null ) : array Returns the migration status for all packages.
migrate ( string $packageKey = null, string $versionNumber = null, boolean $force = false ) : void This iterates over available migrations and applies them to the existing packages if - the package needs the migration - is a clean git working copy
on ( string $eventIdentifier, Closure $callback ) Attaches a new event handler
setPackagesPath ( string $packagesPath ) : void Allows to set the packages path.

보호된 메소드들

메소드 설명
commitMigration ( AbstractMigration $migration, string $commitMessageNotice = null ) : string Commit changes done to the package described by $packageData. The migration that was did the changes is given with $versionNumber and $versionPackageKey and will be recorded in the commit message.
getMigrations ( string $versionNumber = null ) : AbstractMigration[]
getPackagesData ( string $packageKey = null ) : array
hasMigrationApplied ( AbstractMigration $migration ) : boolean Whether or not the given $migration has been applied to the current package
importMigrationLogFromGitHistory ( boolean $commitChanges = false ) : string Imports the core migration log from the git history if it has not been imported previously (the "applied-flow-migrations" composer manifest property does not exist)
initialize ( ) : void Initialize the manager: read package information and register migrations.
markMigrationApplied ( AbstractMigration $migration ) : boolean Whether or not the given migration has been applied in the given path
migratePackage ( AbstractMigration $migration, boolean $force = false ) : void Apply the given migration to the package and commit the result.
registerMigrationFiles ( string $packagePath ) : void Look for code migration files in the given package path and register them for further action.
shouldPackageBeSkippedByDefault ( ) : boolean By default we skip "TYPO3.*" and "Neos.*" packages and all packages of the ignored categories (@see ignoredPackageCategories)
triggerEvent ( string $eventIdentifier, array $eventData = null ) Trigger a custom event
writeComposerManifest ( ) : void

메소드 상세

commitMigration() 보호된 메소드

Commit changes done to the package described by $packageData. The migration that was did the changes is given with $versionNumber and $versionPackageKey and will be recorded in the commit message.
protected commitMigration ( AbstractMigration $migration, string $commitMessageNotice = null ) : string
$migration AbstractMigration
$commitMessageNotice string
리턴 string

getCurrentPackageKey() 공개 메소드

public getCurrentPackageKey ( ) : string
리턴 string

getMigrations() 보호된 메소드

protected getMigrations ( string $versionNumber = null ) : AbstractMigration[]
$versionNumber string if specified only the migration with the specified version is returned
리턴 AbstractMigration[]

getPackagesData() 보호된 메소드

protected getPackagesData ( string $packageKey = null ) : array
$packageKey string if specified, only the package data for the given key is returned
리턴 array in the format [' ['packageKey' => '', 'category' => , 'path' => '', 'meta' => '', 'composerManifest' => ''], [...]]

getStatus() 공개 메소드

Returns the migration status for all packages.
public getStatus ( string $packageKey = null, string $versionNumber = null ) : array
$packageKey string key of the package to migrate, or NULL to migrate all packages
$versionNumber string version of the migration to fetch the status for (e.g. "20120126163610"), or NULL to consider all migrations
리턴 array in the format [ => ['migration' => , 'state' => ], [...]]

hasMigrationApplied() 보호된 메소드

Whether or not the given $migration has been applied to the current package
protected hasMigrationApplied ( AbstractMigration $migration ) : boolean
$migration AbstractMigration
리턴 boolean

importMigrationLogFromGitHistory() 보호된 메소드

Imports the core migration log from the git history if it has not been imported previously (the "applied-flow-migrations" composer manifest property does not exist)
protected importMigrationLogFromGitHistory ( boolean $commitChanges = false ) : string
$commitChanges boolean if TRUE the modified composer manifest is committed - if it changed
리턴 string

initialize() 보호된 메소드

Initialize the manager: read package information and register migrations.
protected initialize ( ) : void
리턴 void

markMigrationApplied() 보호된 메소드

Whether or not the given migration has been applied in the given path
protected markMigrationApplied ( AbstractMigration $migration ) : boolean
$migration AbstractMigration
리턴 boolean

migrate() 공개 메소드

This iterates over available migrations and applies them to the existing packages if - the package needs the migration - is a clean git working copy
public migrate ( string $packageKey = null, string $versionNumber = null, boolean $force = false ) : void
$packageKey string key of the package to migrate, or NULL to migrate all packages
$versionNumber string version of the migration to execute (e.g. "20120126163610"), or NULL to execute all migrations
$force boolean if TRUE migrations will be applied even if the corresponding package is not a git working copy or contains local changes
리턴 void

migratePackage() 보호된 메소드

Apply the given migration to the package and commit the result.
protected migratePackage ( AbstractMigration $migration, boolean $force = false ) : void
$migration AbstractMigration
$force boolean if TRUE the migration will be applied even if the current package is not a git working copy or contains local changes
리턴 void

on() 공개 메소드

Attaches a new event handler
public on ( string $eventIdentifier, Closure $callback )
$eventIdentifier string one of the EVENT_* constants
$callback Closure a closure to be invoked when the corresponding event was triggered

registerMigrationFiles() 보호된 메소드

Look for code migration files in the given package path and register them for further action.
protected registerMigrationFiles ( string $packagePath ) : void
$packagePath string
리턴 void

setPackagesPath() 공개 메소드

The level directly inside is expected to consist of package "categories" (Framework, Application, Plugins, ...).
public setPackagesPath ( string $packagesPath ) : void
$packagesPath string
리턴 void

shouldPackageBeSkippedByDefault() 보호된 메소드

By default we skip "TYPO3.*" and "Neos.*" packages and all packages of the ignored categories (@see ignoredPackageCategories)

triggerEvent() 보호된 메소드

Trigger a custom event
protected triggerEvent ( string $eventIdentifier, array $eventData = null )
$eventIdentifier string one of the EVENT_* constants
$eventData array optional arguments to be passed to the handler closure

writeComposerManifest() 보호된 메소드

protected writeComposerManifest ( ) : void
리턴 void

프로퍼티 상세

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

..)
protected array $currentPackageData
리턴 array

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

Callbacks to be invoked when an event is triggered
또한 보기: triggerEvent()
protected array $eventCallbacks
리턴 array

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

protected array $ignoredPackageCategories
리턴 array

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

protected AbstractMigration[],Neos\Flow\Core\Migrations $migrations
리턴 AbstractMigration[]

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

protected array $packagesData
리턴 array

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

protected string $packagesPath
리턴 string