PHP Class Horde_Vcs_Directory_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.
Author: Anil Madhavapeddy ([email protected])
Author: Michael Slusarz ([email protected])
Author: Jan Schneider ([email protected])
Afficher le fichier Open project: horde/horde Class Usage Examples

Protected Properties

Свойство Type Description
$_dirName string The directory's path inside the repository.
$_dirs array A (string) list of directories inside this directory.
$_files array A list of Horde_Vcs_File_Base objects representing all files inside this directory.
$_rep Horde_Vcs_Base The directory's repository object.

Méthodes publiques

Méthode Description
__construct ( Horde_Vcs_Base $rep, string $dn, array $opts = [] ) Constructor.
_fileAgeSort ( $a, $b ) Sort function for ascending age.
_fileAuthorSort ( $a, $b ) Sort function by author name.
_fileNameSort ( $a, $b ) Sort function for ascending filename.
_fileRevSort ( $a, $b ) Sort function for ascending revision.
applySort ( integer $how = Horde_Vcs::SORT_NONE, integer $dir = Horde_Vcs::SORT_ASCENDING ) Sorts the the directory contents.
getBranches ( ) : array Returns a list of all branches in this directory.
getDirectories ( ) Returns a list of directories inside this directory.
getFiles ( $showdeleted = false ) : array Returns a list of all files inside this directory.

Méthodes protégées

Méthode Description
_doFileSort ( array &$fileList, integer $how = Horde_Vcs::SORT_NONE ) Sorts a list files.

Method Details

__construct() public méthode

Constructor.
public __construct ( Horde_Vcs_Base $rep, string $dn, array $opts = [] )
$rep Horde_Vcs_Base A repository object.
$dn string Path to the directory.
$opts array Any additional options:

_doFileSort() protected méthode

Sorts a list files.
See also: applySort()
protected _doFileSort ( array &$fileList, integer $how = Horde_Vcs::SORT_NONE )
$fileList array A list of files.
$how integer A Horde_Vcs::SORT_* constant.

_fileAgeSort() public méthode

Sort function for ascending age.
public _fileAgeSort ( $a, $b )

_fileAuthorSort() public méthode

Sort function by author name.
public _fileAuthorSort ( $a, $b )

_fileNameSort() public méthode

Sort function for ascending filename.
public _fileNameSort ( $a, $b )

_fileRevSort() public méthode

Sort function for ascending revision.
public _fileRevSort ( $a, $b )

applySort() public méthode

Sorts the the directory contents.
public applySort ( integer $how = Horde_Vcs::SORT_NONE, integer $dir = Horde_Vcs::SORT_ASCENDING )
$how integer A Horde_Vcs::SORT_* constant where * can be: NONE, NAME, AGE, REV for sorting by name, age or revision.
$dir integer A Horde_Vcs::SORT_* constant where * can be: ASCENDING, DESCENDING for the order of the sort.

getBranches() public méthode

Returns a list of all branches in this directory.
public getBranches ( ) : array
Résultat array A branch list.

getDirectories() public méthode

return array A (string) list of directories.
public getDirectories ( )

getFiles() public méthode

Returns a list of all files inside this directory.
public getFiles ( $showdeleted = false ) : array
Résultat array A list of Horde_Vcs_File_Base objects.

Property Details

$_dirName protected_oe property

The directory's path inside the repository.
protected string $_dirName
Résultat string

$_dirs protected_oe property

A (string) list of directories inside this directory.
protected array $_dirs
Résultat array

$_files protected_oe property

A list of Horde_Vcs_File_Base objects representing all files inside this directory.
protected array $_files
Résultat array

$_rep protected_oe property

The directory's repository object.
protected Horde_Vcs_Base $_rep
Résultat Horde_Vcs_Base