프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$database | |||
$entities | array | null |
메소드 | 설명 | |
---|---|---|
__construct ( |
||
reset ( ) | Resets values persisted for the multipass processing. | |
synchronize ( string $task, array $entitiesToSynchronize = null ) : string[] | Synchronizes entities from storage to the database. It generally only works with tracked entities, i.e. the ignored (untracked) rows in the database are left untouched. The rows corresponding to tracked entities are usually in sync with the storage after this method is done. It may happen that the synchronizer cannot synchronize everything in the first pass. Because of this, the synchronize method takes a task for sychronization (usually "everything" for the first pass) and returns a list of tasks that aren't done yet. It's up to the SynchronizationProcess to call the synchronize method again with this tasks when the previous pass is done. |
메소드 | 설명 | |
---|---|---|
buildCreateQuery ( $entity ) | ||
computeColumnValues ( ) | Specific entities might contain ignored colums, which values should be computed on synchronizing process e.g. posts. |
메소드 | 설명 | |
---|---|---|
addOrUpdateEntities ( ) | ||
buildUpdateQuery ( $updateData ) | ||
buildUpdateQueryForEntityWithGeneratedVpid ( $updateData ) | ||
buildUpdateQueryForEntityWithNaturalVpid ( $updateData ) | ||
cleanCache ( ) | Cleans caches specified in schema.yml. | |
createEntityInDatabase ( $entity ) | ||
createIdentifierRecord ( $vpid, $id ) | ||
createTable ( ) | -------------------------------------- | |
deleteEntitiesWhichAreNotInStorage ( ) | ||
entityContainsComputedValues ( ) | ||
existsInDatabase ( $vpid ) | ||
fixMnReferences ( ) | ||
fixReferences ( ) | -------------------------------------- | |
getAllVpIdsUsedInReferences ( $referencesToSave ) : array | ||
getExistingMnReferences ( ) : array | ||
getIdsForVpIds ( $referencesToUpdate ) | ||
idMapContainsAllVpIds ( $idMap, $vpIds ) | ||
loadEntitiesFromStorage ( ) : array | Loads entities from storage. For full synchronization it loads all entities. For selective synchronization it loads only entities from $this->entitiesToSynchronize. | |
maybeInit ( ) | ||
maybeStripMetaEntities ( array $entities ) : array | Strips meta entities from their parents. Called after entities have been loaded from storage. | |
restoreShortcodesInAllEntities ( ) | ||
updateDatabase ( ) | Adds, updates and deletes rows in the database | |
updateEntityInDatabase ( $entity ) |
public __construct ( |
||
$storage | Specific Synchronizers will use specific storage types, see SynchronizerFactory | |
$database | ||
$entityInfo | ||
$dbSchemaInfo | ||
$vpidRepository | ||
$urlReplacer | ||
$shortcodesReplacer | ||
$tableSchemaStorage |
protected computeColumnValues ( ) |
public synchronize ( string $task, array $entitiesToSynchronize = null ) : string[] | ||
$task | string | |
$entitiesToSynchronize | array | List of VPIDs and their possible parents {@see \SynchronizationProcess::synchronize()} |
리턴 | string[] |
protected Database,VersionPress\Database $database | ||
리턴 |