ComposerRepository
class ComposerRepository extends Repository implements RepositoryInterface
Composer repository driver class
Properties
protected string | $repositoryUrl | Repository url | from Repository |
protected string | $packageName | Package name | from Repository |
protected string|null | $repositoryName | Repo name | from Repository |
protected StorageInterface|null | $storage | Local storage | from Repository |
protected HttpClientInterface|null | $httpClient | Http client | from Repository |
protected string|null | $repositoryDir | Storage repository dir | from Repository |
protected string|null | $accessKey | Access key | from Repository |
protected string|null | $tempDir | Temp directory | from Repository |
protected string|null | $installDir | Package install dir | from Repository |
Methods
__construct(string $repositoryUrl, string|null $repositoryDir = null, string|null $installDir = null, StorageInterface|null $storage = null, HttpClientInterface|null $httpClient = null, string|null $accessKey = null)
Constructor
from Repository
bool
install(string|null $version = null)
Install package
string
getLastVersionUrl()
Get last version url
string
getDownloadUrl(string $version)
Get download repo url
bool
download(string|null $version = null)
Download package
string|null
getLastVersion()
Get package last version
bool
isPrivate()
Return true if repo is private
string|false
extractRepository(string $version, string|null $targetDir = null)
Extract repositry zip file to storage/temp folder
from Repository
void
resolvePackageName()
Resolve package name and repository name
Details
in Repository 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 99
bool
install(string|null $version = null)
Install package
at line 26
string
getLastVersionUrl()
Get last version url
at line 39
string
getDownloadUrl(string $version)
Get download repo url
at line 62
bool
download(string|null $version = null)
Download package
at line 72
string|null
getLastVersion()
Get package last version
at line 51
bool
isPrivate()
Return true if repo is private
in Repository at line 164
string|null
getAccessKey()
Get access key for private repo
in Repository at line 174
string
getRepositoryUrl()
Get repository url
in Repository at line 185
string
getPackageFileName(string $version)
Get package file name
in Repository at line 197
string
getPackageName()
Get package name
in Repository at line 207
string
getRepositoryName()
Get repository name
in Repository at line 219
protected string|false
extractRepository(string $version, string|null $targetDir = null)
Extract repositry zip file to storage/temp folder
at line 85
protected void
resolvePackageName()
Resolve package name and repository name