PHP Class VersionPress\Git\Commit

Mostra file Open project: versionpress/versionpress Class Usage Examples

Public Methods

Method Description
buildFromString ( $rawCommit, $rawStatus ) : Commit Creates instance from string matching pattern:
where
is record separator character (ascii ordinary number 30)
getAuthorEmail ( ) : string
getAuthorName ( ) : string
getChangedFiles ( ) : array
getDate ( ) : DateTime
getHash ( ) : string
getMessage ( ) : CommitMessage
getParentHashes ( ) : string[]
getRelativeDate ( ) : string
getShortHash ( ) : string Short hash - first 7 characters.
isMerge ( ) : boolean

Method Details

buildFromString() public static method

Creates instance from string matching pattern:
where
is record separator character (ascii ordinary number 30)
public static buildFromString ( $rawCommit, $rawStatus ) : Commit
$rawCommit string
$rawStatus string
return Commit

getAuthorEmail() public method

public getAuthorEmail ( ) : string
return string

getAuthorName() public method

public getAuthorName ( ) : string
return string

getChangedFiles() public method

public getChangedFiles ( ) : array
return array Array of things like `array("status" => "M", "path" => "wp-content/vpdb/something.ini" )`

getDate() public method

public getDate ( ) : DateTime
return DateTime

getHash() public method

public getHash ( ) : string
return string

getMessage() public method

public getMessage ( ) : CommitMessage
return CommitMessage

getParentHashes() public method

public getParentHashes ( ) : string[]
return string[]

getRelativeDate() public method

public getRelativeDate ( ) : string
return string

getShortHash() public method

Short hash - first 7 characters.
public getShortHash ( ) : string
return string

isMerge() public method

public isMerge ( ) : boolean
return boolean