ArikaimRepository
extends Repository
in package
implements
RepositoryInterface
Arikaim 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|null
- 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
$httpClient
Http client
protected
HttpClientInterface|null
$httpClient
= null
$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
$storage
Local storage
protected
StorageInterface|null
$storage
= null
$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
boolgetAccessKey()
Get access key for private repo
public
getAccessKey() : string|null
Return values
string|nullgetDownloadUrl()
Get download repo url
public
getDownloadUrl(string $version) : string
Parameters
- $version : string
Return values
stringgetLastVersion()
Get package last version
public
getLastVersion() : string|null
Return values
string|nullgetLastVersionUrl()
Get last version url
public
getLastVersionUrl() : string
Return values
stringgetPackageFileName()
Get package file name
public
getPackageFileName(string $version) : string
Parameters
- $version : string
Return values
stringgetPackageName()
Get package name
public
getPackageName() : string
Return values
stringgetRepositoryName()
Get repository name
public
getRepositoryName() : string
Return values
stringgetRepositoryUrl()
Get repository url
public
getRepositoryUrl() : string
Return values
stringinstall()
Install package
public
install([string|null $version = null ]) : bool
Parameters
- $version : string|null = null
Return values
boolisPrivate()
Return true if repo is private
public
isPrivate() : bool
Return values
boolextractRepository()
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