Arikaim CMS

GitHubRepository extends Repository
in package
implements RepositoryInterface

GitHub repository driver class

Table of Contents

Interfaces

RepositoryInterface
Repositorydriver interface

Properties

$accessKey  : string|null
Access key
$httpClient  : HttpClientInterface|null
Http client
$installDir  : string|null
Package install dir
$packageName  : string
Package name
$repositoryDir  : string|null
Storage repository dir
$repositoryName  : string|null
Repo name
$repositoryUrl  : string
Repository url
$storage  : StorageInterface|null
Local storage
$tempDir  : string|null
Temp directory

Methods

__construct()  : mixed
Constructor
download()  : bool
Download package
getAccessKey()  : string|null
Get access key for private repo
getDownloadUrl()  : string
Get download repo url
getLastVersion()  : string
Get package last version
getLastVersionUrl()  : string
Get last version url
getPackageFileName()  : string
Get package file name
getPackageName()  : string
Get package name
getRepositoryName()  : string
Get repository name
getRepositoryUrl()  : string
Get repository url
install()  : bool
Install package
isPrivate()  : bool
Return true if repo is private
extractRepository()  : string|false
Extract repositry zip file to storage/temp folder
resolvePackageName()  : void
Resolve package name and repository name

Properties

$accessKey

Access key

protected string|null $accessKey

$installDir

Package install dir

protected string|null $installDir = null

$packageName

Package name

protected string $packageName

$repositoryDir

Storage repository dir

protected string|null $repositoryDir = null

$repositoryName

Repo name

protected string|null $repositoryName = null

$repositoryUrl

Repository url

protected string $repositoryUrl

$tempDir

Temp directory

protected string|null $tempDir = null

Methods

__construct()

Constructor

public __construct(string $repositoryUrl[, string|null $repositoryDir = null ][, string|null $installDir = null ][, StorageInterface|null $storage = null ][, HttpClientInterface|null $httpClient = null ][, bool $accessKey = null ]) : mixed
Parameters
$repositoryUrl : string
$repositoryDir : string|null = null
$installDir : string|null = null
$storage : StorageInterface|null = null
$httpClient : HttpClientInterface|null = null
$accessKey : bool = null

download()

Download package

public download([string|null $version = null ]) : bool
Parameters
$version : string|null = null
Return values
bool

getAccessKey()

Get access key for private repo

public getAccessKey() : string|null
Return values
string|null

getDownloadUrl()

Get download repo url

public getDownloadUrl(string $version) : string
Parameters
$version : string
Return values
string

getLastVersion()

Get package last version

public getLastVersion() : string
Return values
string

getLastVersionUrl()

Get last version url

public getLastVersionUrl() : string
Return values
string

getPackageFileName()

Get package file name

public getPackageFileName(string $version) : string
Parameters
$version : string
Return values
string

getPackageName()

Get package name

public getPackageName() : string
Return values
string

getRepositoryName()

Get repository name

public getRepositoryName() : string
Return values
string

getRepositoryUrl()

Get repository url

public getRepositoryUrl() : string
Return values
string

install()

Install package

public install([string|null $version = null ]) : bool
Parameters
$version : string|null = null
Return values
bool

isPrivate()

Return true if repo is private

public isPrivate() : bool
Return values
bool

extractRepository()

Extract repositry zip file to storage/temp folder

protected extractRepository(string $version[, string|null $targetDir = null ]) : string|false
Parameters
$version : string
$targetDir : string|null = null
Return values
string|false

Return packge folder

resolvePackageName()

Resolve package name and repository name

protected resolvePackageName() : void

        
On this page

Search results