VersionInfoRepository
in package
Class VersionInfoRepository
This class provides methods for retrieving data of a particular category and a collection of specific categories.
Tags
Table of Contents
- $databaseReader : VersionInfoDatabaseReader
- $fileReader : VersionInfoFileReader
- __construct() : mixed
- VersionInfoRepository constructor.
- getAllVersionInfoItems() : array<string|int, VersionInfoItemInterface>
- Returns an array of VersionInfoItemInterface objects.
- getLastInstalledVersion() : VersionInfoDatabaseItem|null
- Returns the last installed version or "null" if no results are found.
- _getTheCurrentInstallationVersionTimestamp() : int
- Get the currentInstallationTimestamp and returns it.
- _getTheOriginInstallationVersionTimestamp() : int
- Get the originInstallationTimestamp and returns it.
- _isSpecialName() : bool
- Returns true if the version info item has an special name.
- _isSpecialNameWithRightVendor() : bool
- Returns true if the version info item has an special name with the right Vendor.
- _markAllVersionFileItemsWithFailed() : mixed
- Marks all VersionInfoFileItems as failed installation.
- _markInstalledTargetVersions() : mixed
- Marks all VersionInfoDatabaseItems and VersionInfoFileItems form Gambio, with the same version as InstalledTargetVersion.
- _markOldVersionsCaseAsTargetVersions() : mixed
- If the Item is an shop update, marks all VersionInfoFileItem under version 2.1 as Target Version .
- _marksSpecialVersionNamesAsTargetVersions() : mixed
- Marks all Versions with 'vrrl', 'Mobile Template' and 'MobileCandy' in Name as target versions.
- _markTheNewestTargetVersion() : mixed
- Marks with the currentInstallationVersionTimestamp the currentInstallationVersion
- _markTheOldestTargetVersion() : mixed
- Marks with the originInstallationTimestamp the originInstallationVersion
- _sortVersionInfoItemByTime() : int
- Sorted all Version Info Items by time, newest first
Properties
$databaseReader
protected
VersionInfoDatabaseReader
$databaseReader
$fileReader
protected
VersionInfoFileReader
$fileReader
Methods
__construct()
VersionInfoRepository constructor.
public
__construct(VersionInfoDatabaseReader $databaseReader, VersionInfoFileReader $fileReader) : mixed
Parameters
- $databaseReader : VersionInfoDatabaseReader
- $fileReader : VersionInfoFileReader
Return values
mixed —getAllVersionInfoItems()
Returns an array of VersionInfoItemInterface objects.
public
getAllVersionInfoItems() : array<string|int, VersionInfoItemInterface>
Return values
array<string|int, VersionInfoItemInterface> —getLastInstalledVersion()
Returns the last installed version or "null" if no results are found.
public
getLastInstalledVersion() : VersionInfoDatabaseItem|null
Return values
VersionInfoDatabaseItem|null —_getTheCurrentInstallationVersionTimestamp()
Get the currentInstallationTimestamp and returns it.
protected
_getTheCurrentInstallationVersionTimestamp( $versionInfoItems) : int
Parameters
Return values
int —$currentInstallationVersionTimestamp
_getTheOriginInstallationVersionTimestamp()
Get the originInstallationTimestamp and returns it.
protected
_getTheOriginInstallationVersionTimestamp( $versionInfoItems) : int
Parameters
Return values
int —$originInstallationVersionTimestamp
_isSpecialName()
Returns true if the version info item has an special name.
protected
_isSpecialName(VersionInfoItemInterface $VersionInfoItem) : bool
Parameters
- $VersionInfoItem : VersionInfoItemInterface
Return values
bool —_isSpecialNameWithRightVendor()
Returns true if the version info item has an special name with the right Vendor.
protected
_isSpecialNameWithRightVendor(VersionInfoItemInterface $VersionInfoItem) : bool
Parameters
- $VersionInfoItem : VersionInfoItemInterface
Return values
bool —_markAllVersionFileItemsWithFailed()
Marks all VersionInfoFileItems as failed installation.
protected
_markAllVersionFileItemsWithFailed( $versionInfoFileItems) : mixed
Parameters
Return values
mixed —_markInstalledTargetVersions()
Marks all VersionInfoDatabaseItems and VersionInfoFileItems form Gambio, with the same version as InstalledTargetVersion.
protected
_markInstalledTargetVersions(array<string|int, mixed> $versionInfoFileItems, array<string|int, mixed> $versionInfoDatabaseItems) : mixed
Parameters
- $versionInfoFileItems : array<string|int, mixed>
-
[]
- $versionInfoDatabaseItems : array<string|int, mixed>
-
[]
Return values
mixed —_markOldVersionsCaseAsTargetVersions()
If the Item is an shop update, marks all VersionInfoFileItem under version 2.1 as Target Version .
protected
_markOldVersionsCaseAsTargetVersions( $versionInfoFileItems) : mixed
Parameters
Return values
mixed —_marksSpecialVersionNamesAsTargetVersions()
Marks all Versions with 'vrrl', 'Mobile Template' and 'MobileCandy' in Name as target versions.
protected
_marksSpecialVersionNamesAsTargetVersions(array<string|int, mixed> $versionInfoItems) : mixed
Parameters
- $versionInfoItems : array<string|int, mixed>
Return values
mixed —_markTheNewestTargetVersion()
Marks with the currentInstallationVersionTimestamp the currentInstallationVersion
protected
_markTheNewestTargetVersion( $versionInfoItems, mixed $currentInstallationVersionTimestamp) : mixed
Parameters
Return values
mixed —_markTheOldestTargetVersion()
Marks with the originInstallationTimestamp the originInstallationVersion
protected
_markTheOldestTargetVersion( $versionInfoItems, mixed $originInstallationVersionTimestamp) : mixed
Parameters
Return values
mixed —_sortVersionInfoItemByTime()
Sorted all Version Info Items by time, newest first
protected
_sortVersionInfoItemByTime(VersionInfoItemInterface $a, VersionInfoItemInterface $b) : int