PHP Class Banago\PHPloy\Git

Afficher le fichier Open project: banago/phploy

Méthodes publiques

Свойство Type Description
$branch Git branch
$revision Git revision

Protected Properties

Свойство Type Description
$repo Git repository

Méthodes publiques

Méthode Description
__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).

Method Details

__construct() public méthode

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

checkout() public méthode

Checkout given $branch.
public checkout ( string $branch, string $repoPath = null ) : array
$branch string
$repoPath string
Résultat array

command() public méthode

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
Résultat array Lines of the output

diff() public méthode

Diff versions.
public diff ( string $remoteRevision, string $localRevision, string $repoPath = null ) : array
$remoteRevision string
$localRevision string
$repoPath string
Résultat array

exec() public méthode

Executes a console command and returns the output (as an array).
public exec ( string $command ) : array
$command string Command to execute
Résultat array of all lines that were output to the console during the command (STDOUT)

Property Details

$branch public_oe property

Git branch
public $branch

$repo protected_oe property

Git repository
protected $repo

$revision public_oe property

Git revision
public $revision