PHP Класс TQ\Vcs\Repository\AbstractRepository

Наследование: implements TQ\Vcs\Repository\RepositoryInterface
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$author string The author used when committing changes
$directoryCreationMode integer The mode used to create directories when requested
$fileCreationMode integer The mode used to create files when requested
$repositoryPath string The repository path

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

Метод Описание
getAuthor ( ) : string Returns the author used when committing changes
getDirectoryCreationMode ( ) : integer Returns the mode used to create directories when requested
getFileCreationMode ( ) : integer Returns the mode used to create files when requested
getRepositoryPath ( ) : string Returns the full file system path to the repository
resolveFullPath ( string | array $path ) : string | array Resolves a path relative to the repository into an absolute path
resolveLocalPath ( string | array $path ) : string | array Resolves an absolute path into a path relative to the repository path
setAuthor ( string $author ) : TQ\Vcs\Repository\RepositoryInterface Sets the author used when committing changes
setDirectoryCreationMode ( integer $directoryCreationMode ) : TQ\Vcs\Repository\RepositoryInterface Sets the mode used to create directories when requested
setFileCreationMode ( integer $fileCreationMode ) : TQ\Vcs\Repository\RepositoryInterface Sets the mode used to create files when requested
transactional ( Closure $function ) : Transaction Runs $function in a transactional scope committing all changes to the repository on success, but rolling back all changes in the event of an Exception being thrown in the closure

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

Метод Описание
__construct ( string $repositoryPath ) Creates a new repository instance - use {@see open()} instead

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

__construct() защищенный метод

Creates a new repository instance - use {@see open()} instead
protected __construct ( string $repositoryPath )
$repositoryPath string

getAuthor() публичный метод

Returns the author used when committing changes
public getAuthor ( ) : string
Результат string

getDirectoryCreationMode() публичный метод

Returns the mode used to create directories when requested
public getDirectoryCreationMode ( ) : integer
Результат integer

getFileCreationMode() публичный метод

Returns the mode used to create files when requested
public getFileCreationMode ( ) : integer
Результат integer

getRepositoryPath() публичный метод

Returns the full file system path to the repository
public getRepositoryPath ( ) : string
Результат string

resolveFullPath() публичный метод

Resolves a path relative to the repository into an absolute path
public resolveFullPath ( string | array $path ) : string | array
$path string | array A local path (or an array of paths)
Результат string | array Either a single path or an array of paths is returned

resolveLocalPath() публичный метод

Resolves an absolute path into a path relative to the repository path
public resolveLocalPath ( string | array $path ) : string | array
$path string | array A file system path (or an array of paths)
Результат string | array Either a single path or an array of paths is returned

setAuthor() публичный метод

Sets the author used when committing changes
public setAuthor ( string $author ) : TQ\Vcs\Repository\RepositoryInterface
$author string The author used when committing changes
Результат TQ\Vcs\Repository\RepositoryInterface

setDirectoryCreationMode() публичный метод

Sets the mode used to create directories when requested
public setDirectoryCreationMode ( integer $directoryCreationMode ) : TQ\Vcs\Repository\RepositoryInterface
$directoryCreationMode integer The mode, e.g. 755
Результат TQ\Vcs\Repository\RepositoryInterface

setFileCreationMode() публичный метод

Sets the mode used to create files when requested
public setFileCreationMode ( integer $fileCreationMode ) : TQ\Vcs\Repository\RepositoryInterface
$fileCreationMode integer The mode, e.g. 644
Результат TQ\Vcs\Repository\RepositoryInterface

transactional() публичный метод

The closure $function will be called with a {@see \TQ\Vcs\Repository\Transaction} as its only argument
public transactional ( Closure $function ) : Transaction
$function Closure The callback used inside the transaction
Результат Transaction

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

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

The author used when committing changes
protected string $author
Результат string

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

The mode used to create directories when requested
protected int $directoryCreationMode
Результат integer

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

The mode used to create files when requested
protected int $fileCreationMode
Результат integer

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

The repository path
protected string $repositoryPath
Результат string