PHP 클래스 VersionPress\Initialization\Initializer

Tip: to quickly test "undo" initialization for rapid testing, use wp vp-automate start-over command, see VpAutomateCommand.
또한 보기: VpAutomateCommand::startOver
파일 보기 프로젝트 열기: versionpress/versionpress

공개 프로퍼티들

프로퍼티 타입 설명
$onProgressChanged callable[] Array of functions to call when the progress changes. Implements part of the Observer pattern.

공개 메소드들

메소드 설명
__construct ( $database, DbSchemaInfo $dbSchema, StorageFactory $storageFactory, SynchronizerFactory $synchronizerFactory, GitRepository $repository, AbsoluteUrlReplacer $urlReplacer, VpidRepository $vpidRepository, ShortcodesReplacer $shortcodesReplacer, ChangeInfoFactory $changeInfoFactory, ActionsDefinitionRepository $actionsDefinitionRepository )
createVersionPressTables ( )
initializeVersionPress ( boolean $isUpdate = false ) Main entry point

비공개 메소드들

메소드 설명
abortInitialization ( )
activateVersionPress ( )
adjustGitProcessTimeout ( )
checkTimeout ( )
commitDatabase ( ) Commits db changes if database has been locked
copyAccessRulesFiles ( ) Copies the .htaccess and web.config files into the vpdb directory.
createCommonConfig ( )
createGitRepository ( )
createVpidsForEntitiesOfType ( string $entityName ) If entity type identified by $entityName defines an ID column, creates a mapping between WordPress ID and VPID for all entities (db rows) of such type.
doInitializationCommit ( $isUpdate )
extendEntitiesWithVpids ( $entityName, $entities )
getEntitiesFromDatabase ( $entityName ) : mixed
installComposerScripts ( )
installGitignore ( ) Installs Gitignore to the repository root, or does nothing if the file already exists.
lockDatabase ( )
persistActionsDefinitions ( )
replaceForeignKeysWithReferencesInAllEntities ( $entityName, $entities )
replaceShortcodesInAllEntities ( $entityName, $entities )
reportProgressChange ( string $message ) Calls the registered onProgressChanged functions with the progress $message
rollbackDatabase ( ) Rolls back database if it was locked by lockDatabase() and an unexpected shutdown occurred.
saveDatabaseToStorages ( ) Saves all eligible entities into the file system storage (the 'db' folder)
saveEntitiesOfTypeToStorage ( string $entityName ) Saves entities of type identified by $entityName to their appropriate storage (chosen by factory).
saveMetaEntities ( Storage $storage, $entities, $parentReference )
saveMnReferences ( $referenceDetails )
saveStandardEntities ( Storage $storage, $entities )
timeoutIsClose ( )
tryToUseIdsFromDatabase ( )

메소드 상세

__construct() 공개 메소드

public __construct ( $database, DbSchemaInfo $dbSchema, StorageFactory $storageFactory, SynchronizerFactory $synchronizerFactory, GitRepository $repository, AbsoluteUrlReplacer $urlReplacer, VpidRepository $vpidRepository, ShortcodesReplacer $shortcodesReplacer, ChangeInfoFactory $changeInfoFactory, ActionsDefinitionRepository $actionsDefinitionRepository )
$dbSchema VersionPress\Database\DbSchemaInfo
$storageFactory VersionPress\Storages\StorageFactory
$synchronizerFactory VersionPress\Synchronizers\SynchronizerFactory
$repository VersionPress\Git\GitRepository
$urlReplacer VersionPress\Utils\AbsoluteUrlReplacer
$vpidRepository VersionPress\Database\VpidRepository
$shortcodesReplacer VersionPress\Database\ShortcodesReplacer
$changeInfoFactory VersionPress\ChangeInfos\ChangeInfoFactory
$actionsDefinitionRepository VersionPress\Actions\ActionsDefinitionRepository

createVersionPressTables() 공개 메소드

initializeVersionPress() 공개 메소드

Main entry point
public initializeVersionPress ( boolean $isUpdate = false )
$isUpdate boolean Initializer creates `versionpress/update` action if is set to true

프로퍼티 상세

$onProgressChanged 공개적으로 프로퍼티

Array of functions to call when the progress changes. Implements part of the Observer pattern.
public callable[] $onProgressChanged
리턴 callable[]