PHP Класс Gitamin\Services\Git\Util

Показать файл Открыть проект

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

Свойство Тип Описание
$binaryTypes
$defaultFileTypes

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

Метод Описание
extractRef ( GitList\Git\Repository $repository, string $branch = '', string $tree = '' ) : array Returns an Array where the first value is the tree-ish and the second is the path.
getBreadcrumbs ( string $spec ) : array Builds a breadcrumb array based on a path spec.
getFileType ( string $file ) : mixed Returns the file type based on filename by treating the extension.
getReadme ( $repository, $branch = null, $path = '' )
isBinary ( string $file ) : boolean Returns whether the file is binary.

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

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

Returns an Array where the first value is the tree-ish and the second is the path.
public extractRef ( GitList\Git\Repository $repository, string $branch = '', string $tree = '' ) : array
$repository GitList\Git\Repository
$branch string
$tree string
Результат array

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

Builds a breadcrumb array based on a path spec.
public getBreadcrumbs ( string $spec ) : array
$spec string Path spec
Результат array Array with parts of the breadcrumb

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

The file type is used by CodeMirror, a Javascript-based IDE implemented in GitList, to properly highlight the blob syntax (if it's a source-code)
public getFileType ( string $file ) : mixed
$file string File name
Результат mixed File type

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

public getReadme ( $repository, $branch = null, $path = '' )

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

Returns whether the file is binary.
public isBinary ( string $file ) : boolean
$file string
Результат boolean

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

$binaryTypes защищенное статическое свойство

protected static $binaryTypes

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

protected $defaultFileTypes