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

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|null
getAccessKey()

Get access key for private repo

string
getRepositoryUrl()

Get repository url

string
getPackageFileName(string $version)

Get package file name

string
getPackageName()

Get package name

string
getRepositoryName()

Get repository name

string|false
extractRepository(string $version, string|null $targetDir = null)

Extract repositry zip file to storage/temp folder

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

Parameters

string $repositoryUrl
string|null $repositoryDir
string|null $installDir
StorageInterface|null $storage
HttpClientInterface|null $httpClient
string|null $accessKey

at line 99
bool install(string|null $version = null)

Install package

Parameters

string|null $version

Return Value

bool

at line 26
string getLastVersionUrl()

Get last version url

Return Value

string

at line 39
string getDownloadUrl(string $version)

Get download repo url

Parameters

string $version

Return Value

string

at line 62
bool download(string|null $version = null)

Download package

Parameters

string|null $version

Return Value

bool

at line 72
string|null getLastVersion()

Get package last version

Return Value

string|null

at line 51
bool isPrivate()

Return true if repo is private

Return Value

bool

in Repository at line 164
string|null getAccessKey()

Get access key for private repo

Return Value

string|null

in Repository at line 174
string getRepositoryUrl()

Get repository url

Return Value

string

in Repository at line 185
string getPackageFileName(string $version)

Get package file name

Parameters

string $version

Return Value

string

in Repository at line 197
string getPackageName()

Get package name

Return Value

string

in Repository at line 207
string getRepositoryName()

Get repository name

Return Value

string

in Repository at line 219
protected string|false extractRepository(string $version, string|null $targetDir = null)

Extract repositry zip file to storage/temp folder

Parameters

string $version
string|null $targetDir

Return Value

string|false Return packge folder

at line 85
protected void resolvePackageName()

Resolve package name and repository name

Return Value

void