[ Index ] |
PHP Cross Reference of MediaWiki-1.24.0 |
[Source view] [Print] [Project Stats]
(no description)
File Size: | 400 lines (11 kb) |
Included or required: | 0 times |
Referenced: | 1 time |
Includes or requires: | 0 files |
GitInfo:: (16 methods):
__construct()
getCacheFilePath()
repo()
isSHA1()
getHead()
getHeadSHA1()
getHeadCommitDate()
getCurrentBranch()
getHeadViewUrl()
getRemoteUrl()
cacheIsComplete()
precomputeValues()
headSHA1()
currentBranch()
headViewUrl()
getViewers()
__construct( $repoDir, $usePrecomputed = true ) X-Ref |
param: string $repoDir The root directory of the repo where .git can be found param: bool $usePrecomputed Use precomputed information if available |
getCacheFilePath( $repoDir ) X-Ref |
Compute the path to the cache file for a given directory. param: string $repoDir The root directory of the repo where .git can be found return: string Path to GitInfo cache file in $wgGitInfoCacheDirectory or |
repo() X-Ref |
Get the singleton for the repo at $IP return: GitInfo |
isSHA1( $str ) X-Ref |
Check if a string looks like a hex encoded SHA1 hash param: string $str The string to check return: bool Whether or not the string looks like a SHA1 |
getHead() X-Ref |
Get the HEAD of the repo (without any opening "ref: ") return: string|bool The HEAD (git reference or SHA1) or false |
getHeadSHA1() X-Ref |
Get the SHA1 for the current HEAD of the repo return: string|bool A SHA1 or false |
getHeadCommitDate() X-Ref |
Get the commit date of HEAD entry of the git code repository return: int|bool Commit date (UNIX timestamp) or false |
getCurrentBranch() X-Ref |
Get the name of the current branch, or HEAD if not found return: string|bool The branch name, HEAD, or false |
getHeadViewUrl() X-Ref |
Get an URL to a web viewer link to the HEAD revision. return: string|bool String if a URL is available or false otherwise |
getRemoteUrl() X-Ref |
Get the URL of the remote origin. return: string|bool String if a URL is available or false otherwise. |
cacheIsComplete() X-Ref |
Check to see if the current cache is fully populated. Note: This method is public only to make unit testing easier. There's really no strong reason that anything other than a test should want to call this method. return: bool True if all expected cache keys exist, false otherwise |
precomputeValues() X-Ref |
Precompute and cache git information. Creates a JSON file in the cache directory associated with this GitInfo instance. This cache file will be used by subsequent GitInfo objects referencing the same directory to avoid needing to examine the .git directory again. |
headSHA1() X-Ref |
return: string |
currentBranch() X-Ref |
return: string |
headViewUrl() X-Ref |
return: bool|string |
getViewers() X-Ref |
Gets the list of repository viewers return: array |
Generated: Fri Nov 28 14:03:12 2014 | Cross-referenced by PHPXref 0.7.1 |