PHP Класс Gitamin\Services\Git\Repository

Наследование: extends Gitter\Repository
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
createArchive ( string $tree, string $output, string $format = 'zip' ) Create a TAR or ZIP archive of a git tree.
getAuthorStatistics ( $branch )
getBlame ( string $file ) : array Blames the provided file and parses the output.
getCommit ( string $commitHash ) : array Show the data from a specific commit.
getHead ( $default = null ) Get the current branch, returning a default value when HEAD is detached.
getLatestCommit ( $file = null )
getPaginatedCommits ( string $file = null, $page ) : array Show the repository commit log with pagination.
getStatistics ( $branch )
hasCommit ( $commitHash ) : boolean Return true if the repo contains this commit.
pathExists ( string $commitish, string $path ) : boolean Return true if $path exists in $branch; return false otherwise.
readDiffLogs ( array $logs ) : array Read diff logs and generate a collection of diffs.
searchCommitLog ( $query, $branch )
searchTree ( $query, $branch )

Описание методов

createArchive() публичный Метод

Create a TAR or ZIP archive of a git tree.
public createArchive ( string $tree, string $output, string $format = 'zip' )
$tree string Tree-ish reference
$output string Output File name
$format string Archive format

getAuthorStatistics() публичный Метод

public getAuthorStatistics ( $branch )

getBlame() публичный Метод

Blames the provided file and parses the output.
public getBlame ( string $file ) : array
$file string File that will be blamed
Результат array Commits hashes containing the lines

getCommit() публичный Метод

Show the data from a specific commit.
public getCommit ( string $commitHash ) : array
$commitHash string Hash of the specific commit to read data
Результат array Commit data

getHead() публичный Метод

Get the current branch, returning a default value when HEAD is detached.
public getHead ( $default = null )

getLatestCommit() публичный Метод

public getLatestCommit ( $file = null )

getPaginatedCommits() публичный Метод

Show the repository commit log with pagination.
public getPaginatedCommits ( string $file = null, $page ) : array
$file string
Результат array Commit log

getStatistics() публичный Метод

public getStatistics ( $branch )

hasCommit() публичный Метод

Return true if the repo contains this commit.
public hasCommit ( $commitHash ) : boolean
$commitHash Hash of commit whose existence we want to check
Результат boolean Whether or not the commit exists in this repo

pathExists() публичный Метод

Return true if $path exists in $branch; return false otherwise.
public pathExists ( string $commitish, string $path ) : boolean
$commitish string Commitish reference; branch, tag, SHA1, etc.
$path string Path whose existence we want to verify.
Результат boolean GRIPE Arguably belongs in Gitter, as it's generally useful functionality. Also, this really may not be the best way to do this.

readDiffLogs() публичный Метод

Read diff logs and generate a collection of diffs.
public readDiffLogs ( array $logs ) : array
$logs array Array of log rows
Результат array Array of diffs

searchCommitLog() публичный Метод

public searchCommitLog ( $query, $branch )

searchTree() публичный Метод

public searchTree ( $query, $branch )