Commit
in package
Components_Helper_Commit:: helps with collecting for git commit events.
Copyright 2010-2020 Horde LLC (http://www.horde.org/)
See the enclosed file LICENSE for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
Tags
Table of Contents
- $_added : array<string|int, mixed>
- Modified paths.
- $_options : mixed
- $_output : Output
- The output handler.
- __construct() : mixed
- Constructor.
- add() : void
- Add a path to be included in the commit and record the working directory for this git operation.
- commit() : void
- Add all modified files and commit them.
- tag() : void
- Tag the component.
- system() : string
- Run a system call.
- systemInDirectory() : string
- Run a system call.
Properties
$_added
Modified paths.
private
array<string|int, mixed>
$_added
= []
$_options
private
mixed
$_options
$_output read-only
The output handler.
private
Output
$_output
Methods
__construct()
Constructor.
public
__construct(Output $_output, array<string|int, mixed> $_options) : mixed
Parameters
- $_output : Output
-
The output handler.
- $_options : array<string|int, mixed>
-
Application options.
Return values
mixed —add()
Add a path to be included in the commit and record the working directory for this git operation.
public
add(string $path, string $directory) : void
Parameters
- $path : string
-
The path to the modified file.
- $directory : string
-
The working directory.
Return values
void —commit()
Add all modified files and commit them.
public
commit(string $log) : void
Parameters
- $log : string
-
The commit message.
Return values
void —tag()
Tag the component.
public
tag(string $tag, string $message, string $directory) : void
Parameters
- $tag : string
-
Tag name.
- $message : string
-
Tag message.
- $directory : string
-
The working directory.
Return values
void —system()
Run a system call.
protected
system(string $call) : string
Parameters
- $call : string
-
The system call to execute.
Return values
string —The command output.
systemInDirectory()
Run a system call.
protected
systemInDirectory(string $call, string $target_dir) : string
Parameters
- $call : string
-
The system call to execute.
- $target_dir : string
-
Run the command in the provided target path.
Return values
string —The command output.