PHP Class TQ\Vcs\Repository\Transaction

Datei anzeigen Open project: teqneers/php-stream-wrapper-for-git

Protected Properties

Property Type Description
$author string | null The author
$commitHash string | null The commit hash
$commitMsg string | null The commit message
$repository TQ\Vcs\Repository\RepositoryInterface The VCS repository
$result mixed The return value of the transactional callback

Public Methods

Method Description
__construct ( TQ\Vcs\Repository\RepositoryInterface $repository ) Creates a new transactional parameter
getAuthor ( ) : string | null Returns the author that will be used when committing the transaction
getCommitHash ( ) : string | null Returns the hash identifying the commit
getCommitMsg ( ) : string | null Returns the commit message that will be used when committing the transaction
getRepository ( ) : TQ\Vcs\Repository\RepositoryInterface Returns the VCS repository
getRepositoryPath ( ) : string Returns the full file system path to the VCS repository
getResult ( ) : mixed Returns the return value of the closure executed in the transactional scope
resolvePath ( string $path ) : string Resolves a path relative to the repository into an absolute path
setAuthor ( string | null $author ) : Transaction Sets the author that will be used when committing the transaction
setCommitHash ( string $commitHash ) : Transaction Sets the hash identifying the commit
setCommitMsg ( string | null $commitMsg ) : Transaction Sets the commit message that will be used when committing the transaction
setResult ( mixed $result ) : Transaction Sets the return value of the closure executed in the transactional scope

Method Details

__construct() public method

Creates a new transactional parameter
public __construct ( TQ\Vcs\Repository\RepositoryInterface $repository )
$repository TQ\Vcs\Repository\RepositoryInterface The VCS repository

getAuthor() public method

Returns the author that will be used when committing the transaction
public getAuthor ( ) : string | null
return string | null

getCommitHash() public method

Returns the hash identifying the commit
public getCommitHash ( ) : string | null
return string | null

getCommitMsg() public method

Returns the commit message that will be used when committing the transaction
public getCommitMsg ( ) : string | null
return string | null

getRepository() public method

Returns the VCS repository
public getRepository ( ) : TQ\Vcs\Repository\RepositoryInterface
return TQ\Vcs\Repository\RepositoryInterface

getRepositoryPath() public method

Returns the full file system path to the VCS repository
public getRepositoryPath ( ) : string
return string

getResult() public method

Returns the return value of the closure executed in the transactional scope
public getResult ( ) : mixed
return mixed

resolvePath() public method

Resolves a path relative to the repository into an absolute path
public resolvePath ( string $path ) : string
$path string The relative path to convert to an absolute path
return string

setAuthor() public method

Sets the author that will be used when committing the transaction
public setAuthor ( string | null $author ) : Transaction
$author string | null The author
return Transaction

setCommitHash() public method

Sets the hash identifying the commit
public setCommitHash ( string $commitHash ) : Transaction
$commitHash string The commit hash
return Transaction

setCommitMsg() public method

Sets the commit message that will be used when committing the transaction
public setCommitMsg ( string | null $commitMsg ) : Transaction
$commitMsg string | null The commit message
return Transaction

setResult() public method

Sets the return value of the closure executed in the transactional scope
public setResult ( mixed $result ) : Transaction
$result mixed The return value
return Transaction

Property Details

$author protected_oe property

The author
protected string|null $author
return string | null

$commitHash protected_oe property

The commit hash
protected string|null $commitHash
return string | null

$commitMsg protected_oe property

The commit message
protected string|null $commitMsg
return string | null

$repository protected_oe property

The VCS repository
protected RepositoryInterface,TQ\Vcs\Repository $repository
return TQ\Vcs\Repository\RepositoryInterface

$result protected_oe property

The return value of the transactional callback
protected mixed $result
return mixed