PHP Class VersionPress\Git\Reverter

Datei anzeigen Open project: versionpress/versionpress Class Usage Examples

Public Methods

Method Description
__construct ( SynchronizationProcess $synchronizationProcess, Database $database, Committer $committer, GitRepository $repository, DbSchemaInfo $dbSchemaInfo, StorageFactory $storageFactory, CommitMessageParser $commitMessageParser )
canRevert ( )
rollback ( $commits )
undo ( $commits )

Private Methods

Method Description
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 )

Method Details

__construct() public method

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 method

public canRevert ( )

rollback() public method

public rollback ( $commits )

undo() public method

public undo ( $commits )