PHP Класс Horde_Vcs_Git, horde

Constructor args:
'sourceroot': The source root for this repository
'paths': Hash with the locations of all necessary binaries: 'git'
Автор: Chuck Hagenbuch ([email protected])
Автор: Michael Slusarz ([email protected])
Наследование: extends Horde_Vcs_Base
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$version string The git version

Защищенные свойства (Protected)

Свойство Тип Описание
$_branchlist array The list of branches for the repo.
$_diffTypes array The available diff types.
$_driver string The current driver.
$_features array Driver features.

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

Метод Описание
__construct ( $params = [] )
abbrev ( string $rev ) : string Returns an abbreviated form of the revision, for display.
annotate ( $fileob, $rev ) TODO
checkout ( $file, string $rev ) : resource Function which returns a file pointing to the head of the requested revision of a file.
getBranchList ( ) TODO
getCommand ( ) TODO
getDefaultBranch ( )
getRevisionRange ( Horde_Vcs_File_Base $file, string $r1, string $r2 ) : array Create a range of revisions between two revision numbers.
isFile ( $where, $branch = null ) TODO
isValidRevision ( $rev ) TODO
runCommand ( string $args ) : array(resource, Runs a git commands.

Защищенные методы

Метод Описание
_diff ( Horde_Vcs_File_Base $file, string $rev1, string $rev2, array $opts ) : string Obtain the differences between two revisions of a file.
_getRevisionRange ( Horde_Vcs_File_Git $file, $r1, $r2 ) TODO

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

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

public __construct ( $params = [] )

_diff() защищенный Метод

Obtain the differences between two revisions of a file.
protected _diff ( Horde_Vcs_File_Base $file, string $rev1, string $rev2, array $opts ) : string
$file Horde_Vcs_File_Base The desired file.
$rev1 string Original revision number to compare from.
$rev2 string New revision number to compare against.
$opts array The following optional options: - 'num': (integer) DEFAULT: 3 - 'type': (string) DEFAULT: 'unified' - 'ws': (boolean) DEFAULT: true
Результат string The diff text.

_getRevisionRange() защищенный Метод

TODO
protected _getRevisionRange ( Horde_Vcs_File_Git $file, $r1, $r2 )
$file Horde_Vcs_File_Git

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

Returns an abbreviated form of the revision, for display.
public abbrev ( string $rev ) : string
$rev string The revision string.
Результат string The abbreviated string.

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

TODO
public annotate ( $fileob, $rev )

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

Function which returns a file pointing to the head of the requested revision of a file.
public checkout ( $file, string $rev ) : resource
$rev string Revision number to check out
Результат resource A stream pointer to the head of the checkout.

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

TODO
public getBranchList ( )

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

TODO
public getCommand ( )

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

public getDefaultBranch ( )

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

Create a range of revisions between two revision numbers.
public getRevisionRange ( Horde_Vcs_File_Base $file, string $r1, string $r2 ) : array
$file Horde_Vcs_File_Base The desired file.
$r1 string The initial revision.
$r2 string The ending revision.
Результат array The revision range, or empty if there is no straight line path between the revisions.

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

TODO
public isFile ( $where, $branch = null )

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

TODO
public isValidRevision ( $rev )

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

Uses proc_open() to properly catch errors and returns a stream with the command result. fclose() must be called manually on the returned stream and proc_close() on the resource, once the output stream has been finished reading.
public runCommand ( string $args ) : array(resource,
$args string Any arguments for the git command. Must be escaped.
Результат array(resource,

Описание свойств

$_branchlist защищенное свойство

The list of branches for the repo.
protected array $_branchlist
Результат array

$_diffTypes защищенное свойство

The available diff types.
protected array $_diffTypes
Результат array

$_driver защищенное свойство

The current driver.
protected string $_driver
Результат string

$_features защищенное свойство

Driver features.
protected array $_features
Результат array

$version публичное свойство

The git version
public string $version
Результат string