PHP Класс VersionPress\Git\Reverter

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( SynchronizationProcess $synchronizationProcess, Database $database, Committer $committer, GitRepository $repository, DbSchemaInfo $dbSchemaInfo, StorageFactory $storageFactory, CommitMessageParser $commitMessageParser )
canRevert ( )
rollback ( $commits )
undo ( $commits )

Приватные методы

Метод Описание
checkEntityReferences ( $entityName, $entityId, $parentId ) : boolean Returns true if there is no reference constraint violation for given entity.
checkReferencesForRevertedCommit ( Commit $revertedCommit )
clearOrphanedPosts ( ) Deletes orphaned files older than 1 minute (due to postponed commits, that has not been used)
entityExists ( $referencedEntityName, $referencedEntityId, $maybeParentId ) : boolean For standard entities just checks the storage.
existsSomeEntityWithReferenceTo ( $entityName, $entityId ) : boolean Returns true if there is any entity with reference to the passed one.
getAffectedPosts ( $modifiedFiles )
getAllVpIdsFromModifiedFiles ( $modifiedFiles )
revert ( $commits, $method )
revertOneCommit ( $commitHash )
revertToCommit ( $commitHash )
updateChangeDateForPosts ( $vpIds )

Описание методов

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

public __construct ( SynchronizationProcess $synchronizationProcess, Database $database, Committer $committer, GitRepository $repository, DbSchemaInfo $dbSchemaInfo, StorageFactory $storageFactory, CommitMessageParser $commitMessageParser )
$synchronizationProcess VersionPress\Synchronizers\SynchronizationProcess
$database VersionPress\Database\Database
$committer Committer
$repository GitRepository
$dbSchemaInfo VersionPress\Database\DbSchemaInfo
$storageFactory VersionPress\Storages\StorageFactory
$commitMessageParser VersionPress\ChangeInfos\CommitMessageParser

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

public canRevert ( )

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

public rollback ( $commits )

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

public undo ( $commits )