Inherited Variables
Inherited Constants
Inherited Methods
Class Details
The interface for the VCS Adapter Plugins
The VCSAdapter interface defines the interface to be implemented by the VCS Adapter plugins. The methods contained within this class represent common version control system commands. The underlying implementation may vary greatly from VCS to VCS.
[ Top ]
Class Variables
Class Methods
commit
mixed commit(
String
$file_name,
$message)
[line 35]
Commit the changes to the file with name $file_name.
This method commits the changes only to the single file with the name that was passed in as $file_name
Tags:
- return - true on success, WP_Error with a descriptive error message on failure.
- access - public
Parameters:
- String $file_name - A string containing the file name to commit.
- $message -
[ Top ]
commit_all
mixed commit_all(
$message)
[line 25]
Commit changes to all files.
Tags:
- return - true on success, WP_Error with a descriptive error message on failure.
- access - public
Parameters:
- $message -
[ Top ]
get_name
String get_name(
)
[line 85]
Get name of the VCS Adapter.
Tags:
- return - The readable name for this VCS Adapter
- access - public
Parameters:
[ Top ]
get_revision
Revision get_revision(
String
$revision_id)
[line 62]
Get the revision specified by $revision_id
Tags:
- return - The revision with the given revision number
- access - public
Parameters:
- String $revision_id - The revision number or hash of the desired Revision
[ Top ]
get_revisions
array get_revisions(
int
$max_num_revisions)
[line 71]
Returns an array containing up to the number of past revisions specified by num_past_revisons.
If there are fewer than $max_num_past_revisions then all revisions will be returned.
Tags:
- return - An array containing all the revisions, an empty array if there are no revisions
- access - public
Parameters:
- int $max_num_revisions - the maximum number of past revisions to return.
[ Top ]
get_revisions_before
void get_revisions_before(
mixed
$revision_id, int
$num_revisions)
[line 78]
Return the specified number of revisions that were committed before the revision specified by $revision_id (in order from most recent to least recent)
Tags:
- access - public
Parameters:
- mixed $revision_id -
- int $num_revisions - the number of revisions to return
[ Top ]
revert_file_to
true revert_file_to(
String
$revision_id, String
$file_name)
[line 53]
revert the file with name $file_name back to its state
in the given revision
Tags:
- return - on success, a WP_Error on failure
- access - public
Parameters:
- String $revision_id - The Revision to revert to.
- String $file_name - A string containing the file name to commit.
[ Top ]
revert_to
bool revert_to(
The
$revision_id)
[line 43]
Revert all files back to the state in the given revision
Tags:
- return - returns true on success, WP_Error on failure.
- access - public
Parameters:
- The $revision_id - id of the Revision to revert to.
[ Top ]