PHP Class Horde_Vcs_File_Base, horde

Copyright 2008-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
Afficher le fichier Open project: horde/horde Class Usage Examples

Protected Properties

Свойство Type Description
$_branch string TODO
$_dir string The directory of this file.
$_driver string The current driver.
$_initialized boolean Have we initalized logs and revisions?
$_logs array TODO
$_name string The name of this file.
$_rep TODO
$_revs array TODO

Méthodes publiques

Méthode Description
__construct ( string $filename, array $opts = [] ) Constructor.
__sleep ( ) When serializing, don't return the repository object
applySort ( integer $how = Horde_Vcs::SORT_REV ) Sort the list of Horde_Vcs_Log objects that this file contains.
getBlob ( $revision ) TODO - better name, wrap an object around this?
getBranches ( ) TODO
getFileName ( ) : string Returns name of the current file without the repository extensions.
getLastLog ( ) : Horde_Vcs_QuickLog Returns a log object for the most recent log entry of this file.
getLog ( $rev = null ) TODO
getPath ( ) : string Return the "base" filename (i.e. the filename needed by the various command line utilities).
getPreviousRevision ( string $rev ) : 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 ( ) TODO
isDeleted ( ) : boolean Has the file been deleted?
revisionCount ( ) TODO
setRepository ( $rep ) TODO
sortByAge ( $a, $b )
sortByName ( $a, $b )
sortByRevision ( $a, $b ) The sortBy*() functions are internally used by applySort.

Méthodes protégées

Méthode Description
_ensureInitialized ( )
_getLog ( string $rev = null )
_init ( )

Method Details

__construct() public méthode

Constructor.
public __construct ( string $filename, array $opts = [] )
$filename string Full path (inside the source root) to this file.
$opts array Additional parameters: - 'branch': (string)

__sleep() public méthode

When serializing, don't return the repository object
public __sleep ( )

_ensureInitialized() protected méthode

protected _ensureInitialized ( )

_getLog() protected méthode

protected _getLog ( string $rev = null )
$rev string The revision identifier.

_init() abstract protected méthode

abstract protected _init ( )

applySort() public méthode

Sort the list of Horde_Vcs_Log objects that this file contains.
public applySort ( integer $how = Horde_Vcs::SORT_REV )
$how integer Horde_Vcs::SORT_REV (sort by revision), Horde_Vcs::SORT_NAME (sort by author name), or Horde_Vcs::SORT_AGE (sort by commit date).

getBlob() public méthode

TODO - better name, wrap an object around this?
public getBlob ( $revision )

getBranches() public méthode

TODO
public getBranches ( )

getFileName() public méthode

Returns name of the current file without the repository extensions.
public getFileName ( ) : string
Résultat string Filename without repository extension

getLastLog() abstract public méthode

Returns a log object for the most recent log entry of this file.
abstract public getLastLog ( ) : Horde_Vcs_QuickLog
Résultat Horde_Vcs_QuickLog Log object of the last entry in the file.

getLog() public méthode

TODO
public getLog ( $rev = null )

getPath() public méthode

Return the "base" filename (i.e. the filename needed by the various command line utilities).
public getPath ( ) : string
Résultat string A filename.

getPreviousRevision() public méthode

Returns the revision before the specified revision.
public getPreviousRevision ( string $rev ) : string
$rev string A revision.
Résultat string The previous revision or null if the first revision.

getRevision() public méthode

Returns the last revision of the current file on the HEAD branch.
public getRevision ( ) : string
Résultat string Last revision of the current file.

getSourcerootPath() public méthode

Return the filename relative to its sourceroot.
public getSourcerootPath ( ) : string
Résultat string Pathname relative to the sourceroot.

getTags() public méthode

TODO
public getTags ( )

isDeleted() public méthode

Has the file been deleted?
public isDeleted ( ) : boolean
Résultat boolean Is this file deleted?

revisionCount() public méthode

TODO
public revisionCount ( )

setRepository() public méthode

TODO
public setRepository ( $rep )

sortByAge() public méthode

public sortByAge ( $a, $b )

sortByName() public méthode

public sortByName ( $a, $b )

sortByRevision() public méthode

The sortBy*() functions are internally used by applySort.
public sortByRevision ( $a, $b )

Property Details

$_branch protected_oe property

TODO
protected string $_branch
Résultat string

$_dir protected_oe property

The directory of this file.
protected string $_dir
Résultat string

$_driver protected_oe property

The current driver.
protected string $_driver
Résultat string

$_initialized protected_oe property

Have we initalized logs and revisions?
protected bool $_initialized
Résultat boolean

$_logs protected_oe property

TODO
protected array $_logs
Résultat array

$_name protected_oe property

The name of this file.
protected string $_name
Résultat string

$_rep protected_oe property

TODO
protected $_rep

$_revs protected_oe property

TODO
protected array $_revs
Résultat array