PHP Класс Banago\PHPloy\Git

Показать файл Открыть проект

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

Свойство Тип Описание
$branch Git branch
$revision Git revision

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

Свойство Тип Описание
$repo Git repository

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

Метод Описание
__construct ( null $repo = null ) Git constructor.
checkout ( string $branch, string $repoPath = null ) : array Checkout given $branch.
command ( string $command, string $repoPath = null ) : array Runs a git command and returns the output (as an array).
diff ( string $remoteRevision, string $localRevision, string $repoPath = null ) : array Diff versions.
exec ( string $command ) : array Executes a console command and returns the output (as an array).

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

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

Git constructor.
public __construct ( null $repo = null )
$repo null

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

Checkout given $branch.
public checkout ( string $branch, string $repoPath = null ) : array
$branch string
$repoPath string
Результат array

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

Runs a git command and returns the output (as an array).
public command ( string $command, string $repoPath = null ) : array
$command string "git [your-command-here]"
$repoPath string Defaults to $this->repo
Результат array Lines of the output

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

Diff versions.
public diff ( string $remoteRevision, string $localRevision, string $repoPath = null ) : array
$remoteRevision string
$localRevision string
$repoPath string
Результат array

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

Executes a console command and returns the output (as an array).
public exec ( string $command ) : array
$command string Command to execute
Результат array of all lines that were output to the console during the command (STDOUT)

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

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

Git branch
public $branch

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

Git repository
protected $repo

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

Git revision
public $revision