Repository
abstract class Repository implements RepositoryInterface
Repository driver base class
Properties
protected string | $repositoryUrl | Repository url | |
protected string | $packageName | Package name | |
protected string|null | $repositoryName | Repo name | |
protected StorageInterface|null | $storage | Local storage | |
protected HttpClientInterface|null | $httpClient | Http client | |
protected string|null | $repositoryDir | Storage repository dir | |
protected string|null | $accessKey | Access key | |
protected string|null | $tempDir | Temp directory | |
protected string|null | $installDir | Package install dir |
Methods
Constructor
Install package
Should return last version url
Should return download repo url
Download package
Get package last version
Return true if repo is private
Get access key for private repo
Get repository url
Get package file name
Get package name
Get repository name
Extract repositry zip file to storage/temp folder
Resolve package name and repository name
Details
at line 95
__construct(string $repositoryUrl, string|null $repositoryDir = null, string|null $installDir = null, StorageInterface|null $storage = null, HttpClientInterface|null $httpClient = null, string|null $accessKey = null)
Constructor
at line 120
abstract bool
install(string|null $version = null)
Install package
at line 127
abstract string
getLastVersionUrl()
Should return last version url
at line 135
abstract string
getDownloadUrl(string $version)
Should return download repo url
at line 143
abstract bool
download(string|null $version = null)
Download package
at line 150
abstract string|null
getLastVersion()
Get package last version
at line 157
abstract bool
isPrivate()
Return true if repo is private
at line 164
string|null
getAccessKey()
Get access key for private repo
at line 174
string
getRepositoryUrl()
Get repository url
at line 185
string
getPackageFileName(string $version)
Get package file name
at line 197
string
getPackageName()
Get package name
at line 207
string
getRepositoryName()
Get repository name
at line 219
protected string|false
extractRepository(string $version, string|null $targetDir = null)
Extract repositry zip file to storage/temp folder
at line 238
protected void
resolvePackageName()
Resolve package name and repository name