Horde_Vcs_File_Git
extends Horde_Vcs_File_Base
in package
Git file class.
Copyright 2008-2017 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
- $_branch : string
- TODO
- $_dir : string
- The directory of this file.
- $_driver : string
- The current driver.
- $_initialized : bool
- Have we initalized logs and revisions?
- $_logs : array<string|int, mixed>
- TODO
- $_name : string
- The name of this file.
- $_rep : mixed
- TODO
- $_revlist : array<string|int, mixed>
- The master list of revisions for this file.
- $_revs : array<string|int, mixed>
- TODO
- __construct() : mixed
- Constructor.
- __sleep() : mixed
- When serializing, don't return the repository object
- applySort() : mixed
- Sort the list of Horde_Vcs_Log objects that this file contains.
- getBlob() : mixed
- TODO - better name, wrap an object around this?
- getBranch() : array<string|int, mixed>
- Returns all branches that contain a certain revision.
- getBranches() : mixed
- TODO
- getBranchList() : mixed
- TODO
- getFileName() : string
- Returns name of the current file without the repository extensions.
- getHashForRevision() : string
- Get the hash name for this file at a specific revision.
- getLastLog() : Horde_Vcs_QuickLog_Git
- Returns a log object for the most recent log entry of this file.
- getLog() : mixed
- TODO
- getPath() : string
- Return the "base" filename (i.e. the filename needed by the various command line utilities).
- getPreviousRevision() : string
- Returns the revision before the specified revision.
- getRevision() : string
- Returns the last revision of the current file on the HEAD branch.
- getSourcerootPath() : string
- Return the filename relative to its sourceroot.
- getTags() : mixed
- TODO
- isDeleted() : bool
- Has the file been deleted?
- revisionCount() : mixed
- TODO
- setRepository() : mixed
- TODO
- sortByAge() : mixed
- sortByName() : mixed
- sortByRevision() : mixed
- The sortBy*() functions are internally used by applySort.
- _ensureInitialized() : mixed
- _getLog() : mixed
- _init() : mixed
Properties
$_branch
TODO
protected
string
$_branch
= \null
$_dir
The directory of this file.
protected
string
$_dir
$_driver
The current driver.
protected
string
$_driver
= 'Git'
$_initialized
Have we initalized logs and revisions?
protected
bool
$_initialized
= \false
$_logs
TODO
protected
array<string|int, mixed>
$_logs
= array()
$_name
The name of this file.
protected
string
$_name
$_rep
TODO
protected
mixed
$_rep
$_revlist
The master list of revisions for this file.
protected
array<string|int, mixed>
$_revlist
= array()
$_revs
TODO
protected
array<string|int, mixed>
$_revs
= array()
Methods
__construct()
Constructor.
public
__construct(string $filename[, array<string|int, mixed> $opts = array() ]) : mixed
Parameters
- $filename : string
-
Full path (inside the source root) to this file.
- $opts : array<string|int, mixed> = array()
-
Additional parameters:
- 'branch': (string)
Return values
mixed —__sleep()
When serializing, don't return the repository object
public
__sleep() : mixed
Return values
mixed —applySort()
Sort the list of Horde_Vcs_Log objects that this file contains.
public
applySort([int $how = Horde_Vcs::SORT_REV ]) : mixed
Parameters
- $how : int = Horde_Vcs::SORT_REV
-
Horde_Vcs::SORT_REV (sort by revision), Horde_Vcs::SORT_NAME (sort by author name), or Horde_Vcs::SORT_AGE (sort by commit date).
Return values
mixed —getBlob()
TODO - better name, wrap an object around this?
public
getBlob(mixed $revision) : mixed
Parameters
- $revision : mixed
Return values
mixed —getBranch()
Returns all branches that contain a certain revision.
public
getBranch(string $rev) : array<string|int, mixed>
Parameters
- $rev : string
-
A revision.
Return values
array<string|int, mixed> —A list of branches with this revision.
getBranches()
TODO
public
getBranches() : mixed
Return values
mixed —getBranchList()
TODO
public
getBranchList() : mixed
Return values
mixed —getFileName()
Returns name of the current file without the repository extensions.
public
getFileName() : string
Return values
string —Filename without repository extension
getHashForRevision()
Get the hash name for this file at a specific revision.
public
getHashForRevision(string $rev) : string
Parameters
- $rev : string
-
Revision string.
Return values
string —Commit hash.
getLastLog()
Returns a log object for the most recent log entry of this file.
public
getLastLog() : Horde_Vcs_QuickLog_Git
Tags
Return values
Horde_Vcs_QuickLog_Git —Log object of the last entry in the file.
getLog()
TODO
public
getLog([mixed $rev = null ]) : mixed
Parameters
- $rev : mixed = null
Return values
mixed —getPath()
Return the "base" filename (i.e. the filename needed by the various command line utilities).
public
getPath() : string
Return values
string —A filename.
getPreviousRevision()
Returns the revision before the specified revision.
public
getPreviousRevision(string $rev) : string
Parameters
- $rev : string
-
A revision.
Return values
string —The previous revision or null if the first revision.
getRevision()
Returns the last revision of the current file on the HEAD branch.
public
getRevision() : string
Tags
Return values
string —Last revision of the current file.
getSourcerootPath()
Return the filename relative to its sourceroot.
public
getSourcerootPath() : string
Return values
string —Pathname relative to the sourceroot.
getTags()
TODO
public
getTags() : mixed
Return values
mixed —isDeleted()
Has the file been deleted?
public
isDeleted() : bool
Return values
bool —Is this file deleted?
revisionCount()
TODO
public
revisionCount() : mixed
Return values
mixed —setRepository()
TODO
public
setRepository(mixed $rep) : mixed
Parameters
- $rep : mixed
Return values
mixed —sortByAge()
public
sortByAge(mixed $a, mixed $b) : mixed
Parameters
- $a : mixed
- $b : mixed
Return values
mixed —sortByName()
public
sortByName(mixed $a, mixed $b) : mixed
Parameters
- $a : mixed
- $b : mixed
Return values
mixed —sortByRevision()
The sortBy*() functions are internally used by applySort.
public
sortByRevision(mixed $a, mixed $b) : mixed
Parameters
- $a : mixed
- $b : mixed
Return values
mixed —_ensureInitialized()
protected
_ensureInitialized() : mixed
Return values
mixed —_getLog()
protected
_getLog([string $rev = null ]) : mixed
Parameters
- $rev : string = null
-
The revision identifier.
Return values
mixed —_init()
protected
_init() : mixed