PHP Класс Pyrech\ComposerChangelogs\UrlGenerator\GitBasedUrlGenerator

Наследование: implements Pyrech\ComposerChangelogs\UrlGenerator\UrlGenerator
Показать файл Открыть проект

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

Метод Описание
supports ( $sourceUrl )

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

Метод Описание
extractRepositoryInformation ( string $sourceUrl ) : array Extracts information like user and repository from the http url.
generateBaseUrl ( string $sourceUrl ) : string Generates the canonical http url for a repository.
getCompareVersion ( Version $version ) : string Get the version to use for the compare url.
getDomain ( ) : string Returns the domain of the service, like "example.org".

Приватные методы

Метод Описание
isSshUrl ( string $url ) : string Returns whether an url uses a ssh git protocol.
transformSshUrlIntoHttp ( string $url ) : string Transform an ssh git url into an http one.

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

extractRepositoryInformation() защищенный Метод

Extracts information like user and repository from the http url.
protected extractRepositoryInformation ( string $sourceUrl ) : array
$sourceUrl string
Результат array

generateBaseUrl() защищенный Метод

It ensures there is no .git part in http url. It also supports ssh urls by converting them in their http equivalent format.
protected generateBaseUrl ( string $sourceUrl ) : string
$sourceUrl string
Результат string

getCompareVersion() защищенный Метод

For dev versions, it returns the commit short hash in full pretty version.
protected getCompareVersion ( Version $version ) : string
$version Pyrech\ComposerChangelogs\Version
Результат string

getDomain() абстрактный защищенный Метод

Returns the domain of the service, like "example.org".
abstract protected getDomain ( ) : string
Результат string

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

public supports ( $sourceUrl )