PHP 클래스 VersionPress\Git\Committer

파일 보기 프로젝트 열기: versionpress/versionpress 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( Mirror $mirror, GitRepository $repository, StorageFactory $storageFactory )
commit ( ) Checks if there is any change in the $mirror and commits it. If there was a forced change set, it takes precedence.
disableCommit ( ) All commit() calls are ignored after calling this method.
discardPostponedCommit ( string $key ) Unsets previously postponed commit.
forceChangeInfo ( TrackedChangeInfo $changeInfo ) Forces change info to be committed in the next call to commit(), overwriting whatever might have been captured by the VersionPress\Storages\Mirror.
postponeCommit ( string $key ) The commit() method will not affect the repository after calling this method.
usePostponedChangeInfos ( string $key ) Prepends previously postponedChangeInfos ChangeInfo objects to the current one.

비공개 메소드들

메소드 설명
existsMaintenanceFile ( )
flushChangeLists ( )
loadPostponedChangeInfos ( ) : TrackedChangeInfo[key][]
postponeChangeInfo ( VersionPress\ChangeInfos\ChangeInfo[] $changeInfoList )
preprocessChangeInfoList ( TrackedChangeInfo[] $changeInfoList ) : TrackedChangeInfo[][] Removes some ChangeInfo objects and replaces them with another. For example, it replaces post/draft and post/publish actions with single post/create action.
savePostponedChangeInfos ( $postponedChangeInfos )
shouldCommit ( ) : boolean Returns false in the mid-step of WP update.
stageRelatedFiles ( TrackedChangeInfo | ChangeInfoEnvelope $changeInfo ) Calls Git add -A on files that are related to the given $changeInfo.

메소드 상세

__construct() 공개 메소드

public __construct ( Mirror $mirror, GitRepository $repository, StorageFactory $storageFactory )
$mirror VersionPress\Storages\Mirror
$repository GitRepository
$storageFactory VersionPress\Storages\StorageFactory

commit() 공개 메소드

Checks if there is any change in the $mirror and commits it. If there was a forced change set, it takes precedence.
public commit ( )

disableCommit() 공개 메소드

All commit() calls are ignored after calling this method.
public disableCommit ( )

discardPostponedCommit() 공개 메소드

Unsets previously postponed commit.
public discardPostponedCommit ( string $key )
$key string Key for postponedChangeInfos commit

forceChangeInfo() 공개 메소드

There can be more forced changed infos and they behave the same as more ChangeInfos returned by the VersionPress\Storages\Mirror, i.e. are wrapped in a VersionPress\ChangeInfos\ChangeInfoEnvelope and sorted by priorities.
public forceChangeInfo ( TrackedChangeInfo $changeInfo )
$changeInfo VersionPress\ChangeInfos\TrackedChangeInfo

postponeCommit() 공개 메소드

Instead it will save ChangeInfo objects for commit on the next request.
public postponeCommit ( string $key )
$key string Key for postponedChangeInfos commit

usePostponedChangeInfos() 공개 메소드

Prepends previously postponedChangeInfos ChangeInfo objects to the current one.
public usePostponedChangeInfos ( string $key )
$key string Key for postponedChangeInfos commit