PHP Класс 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.
Автор: Anil Madhavapeddy ([email protected])
Автор: Michael Slusarz ([email protected])
Автор: Jan Schneider ([email protected])
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$_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.

Открытые методы

Метод Описание
__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.

Защищенные методы

Метод Описание
_doFileSort ( array &$fileList, integer $how = Horde_Vcs::SORT_NONE ) Sorts a list files.

Описание методов

__construct() публичный Метод

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() защищенный Метод

Sorts a list files.
См. также: 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() публичный Метод

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

_fileAuthorSort() публичный Метод

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

_fileNameSort() публичный Метод

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

_fileRevSort() публичный Метод

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

applySort() публичный Метод

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() публичный Метод

Returns a list of all branches in this directory.
public getBranches ( ) : array
Результат array A branch list.

getDirectories() публичный Метод

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

getFiles() публичный Метод

Returns a list of all files inside this directory.
public getFiles ( $showdeleted = false ) : array
Результат array A list of Horde_Vcs_File_Base objects.

Описание свойств

$_dirName защищенное свойство

The directory's path inside the repository.
protected string $_dirName
Результат string

$_dirs защищенное свойство

A (string) list of directories inside this directory.
protected array $_dirs
Результат array

$_files защищенное свойство

A list of Horde_Vcs_File_Base objects representing all files inside this directory.
protected array $_files
Результат array

$_rep защищенное свойство

The directory's repository object.
protected Horde_Vcs_Base $_rep
Результат Horde_Vcs_Base