PHP 클래스 VersionPress\Git\CommitMessage

Note about the "[VP]" prefix: this class just doesn't care. When the commit is first created, external code will typically put prefix-less subject into this object. Only when {@link VersionPress\Git\GitRepository::commit()} executes the commit itself will get the [VP] prefix. On the other hand, when the commit is read from the repository and parsed back into this object, it will typically have the [VP] prefix. It doesn't matter as VersionPress typically only works with the commit body and its VP tags.
또한 보기: Commit Represents the whole commit
파일 보기 프로젝트 열기: versionpress/versionpress 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( string $subject, string $body = null )
getBody ( ) : string Rest of the commit message (all text except the subject). Usually just the VP tags but body might also contain some other information.
getSubject ( ) : string The first line of the commit message. Short description of the change
getUnprefixedSubject ( ) : string Returns commit message subject without prefix set in constant VERSIONPRESS_COMMIT_MESSAGE_PREFIX
getVersionPressTag ( $tagName ) : string Returns VP tag with given name, or an empty string if no tag of given name is found.
getVersionPressTags ( ) : array Returns all VP tags in an associative array. VP tags are identified as separate lines in the commit body that start with the "VP-" prefix.

메소드 상세

__construct() 공개 메소드

public __construct ( string $subject, string $body = null )
$subject string First line of the commit message
$body string Optional, lines 3..n

getBody() 공개 메소드

Rest of the commit message (all text except the subject). Usually just the VP tags but body might also contain some other information.
public getBody ( ) : string
리턴 string

getSubject() 공개 메소드

The first line of the commit message. Short description of the change
public getSubject ( ) : string
리턴 string

getUnprefixedSubject() 공개 메소드

Returns commit message subject without prefix set in constant VERSIONPRESS_COMMIT_MESSAGE_PREFIX
public getUnprefixedSubject ( ) : string
리턴 string

getVersionPressTag() 공개 메소드

Returns VP tag with given name, or an empty string if no tag of given name is found.
public getVersionPressTag ( $tagName ) : string
$tagName
리턴 string

getVersionPressTags() 공개 메소드

Returns all VP tags in an associative array. VP tags are identified as separate lines in the commit body that start with the "VP-" prefix.
public getVersionPressTags ( ) : array
리턴 array Array of tagName => value (trimmed)