‪TYPO3CMS  11.5
TYPO3\CMS\Extensionmanager\Domain\Model\Dependency Class Reference

Public Member Functions

 getHighestVersion ()
 
 getIdentifier ()
 
 getLowestVersion ()
 
 getType ()
 
bool isVersionCompatible (string $version)
 
 getLowestVersionAsInteger ()
 
 getHighestVersionAsInteger ()
 

Static Public Member Functions

static self createFromEmConf (string $identifier, string $versionConstraint='', string $dependencyType='depends')
 

Static Public Attributes

static array $specialDependencies
 

Protected Attributes

string $identifier = ''
 
string $lowestVersion = ''
 
string $highestVersion = ''
 
string $type = ''
 

Static Protected Attributes

static array $dependencyTypes
 

Private Member Functions

 __construct (string $identifier, string $type, string $lowestVersion, string $highestVersion)
 

Detailed Description

Value Object of a single dependency of an extension

This class is a specific domain model implementation and is not part of the Public TYPO3 API.

Definition at line 27 of file Dependency.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Extensionmanager\Domain\Model\Dependency::__construct ( string  $identifier,
string  $type,
string  $lowestVersion,
string  $highestVersion 
)
private

Member Function Documentation

◆ createFromEmConf()

static self TYPO3\CMS\Extensionmanager\Domain\Model\Dependency::createFromEmConf ( string  $identifier,
string  $versionConstraint = '',
string  $dependencyType = 'depends' 
)
static

Use this factory when building dependencies of an extension, like ["depends"]["news"] => '1.0.0-2.6.9'

Parameters
string$identifier‪the extension name or "typo3" or "php" for TYPO3 Core / PHP version constraints
string$versionConstraint‪the actual version number. "1.0.0-2.0.0" or "1.0.0" which means "1.0.0 or higher"
string$dependencyType‪use "depends", "suggests" or "conflicts".
Returns
‪self
Exceptions
ExtensionManagerException

Definition at line 77 of file Dependency.php.

References TYPO3\CMS\Extensionmanager\Domain\Model\Dependency\$identifier, and TYPO3\CMS\Core\Utility\VersionNumberUtility\convertVersionsStringToVersionNumbers().

Referenced by TYPO3\CMS\Extensionmanager\Tests\Unit\Utility\DependencyUtilityTest\checkPhpDependencyCanHandleEmptyVersionHighestVersion(), TYPO3\CMS\Extensionmanager\Tests\Unit\Utility\DependencyUtilityTest\checkPhpDependencyCanHandleEmptyVersionLowestVersion(), TYPO3\CMS\Extensionmanager\Tests\Unit\Utility\DependencyUtilityTest\checkPhpDependencyErrorsIfVersionNumberIsTooLow(), TYPO3\CMS\Extensionmanager\Tests\Unit\Utility\DependencyUtilityTest\checkPhpDependencyReturnsTrueIfVersionNumberIsInRange(), TYPO3\CMS\Extensionmanager\Tests\Unit\Utility\DependencyUtilityTest\checkPhpDependencyThrowsExceptionIfVersionNumberIsTooHigh(), TYPO3\CMS\Extensionmanager\Tests\Unit\Utility\DependencyUtilityTest\checkTypo3DependencyCanHandleEmptyVersionHighestVersion(), TYPO3\CMS\Extensionmanager\Tests\Unit\Utility\DependencyUtilityTest\checkTypo3DependencyCanHandleEmptyVersionLowestVersion(), TYPO3\CMS\Extensionmanager\Tests\Unit\Utility\DependencyUtilityTest\checkTypo3DependencyErrorsIfVersionNumberIsTooHigh(), TYPO3\CMS\Extensionmanager\Tests\Unit\Utility\DependencyUtilityTest\checkTypo3DependencyErrorsIfVersionNumberIsTooLow(), TYPO3\CMS\Extensionmanager\Tests\Unit\Utility\DependencyUtilityTest\checkTypo3DependencyReturnsTrueIfVersionNumberIsInRange(), TYPO3\CMS\Extensionmanager\Domain\Model\Extension\convertDependenciesToObjects(), TYPO3\CMS\Extensionmanager\Tests\Unit\Domain\Repository\ExtensionRepositoryTest\filterYoungestVersionOfExtensionListFiltersAListToLatestVersionWithOnlyCompatibleExtensions(), TYPO3\CMS\Extensionmanager\Tests\Unit\Domain\Repository\ExtensionRepositoryTest\getExtensionsSuitableForTypo3VersionReturnsOnlySuitableOnes(), TYPO3\CMS\Extensionmanager\Tests\Unit\Utility\DependencyUtilityTest\getLatestCompatibleExtensionByDependencyWillReturnExtensionModelOfLatestExtension(), TYPO3\CMS\Extensionmanager\Tests\Unit\Domain\Model\DependencyTest\getLowestAndHighestIntegerVersionsReturnsArrayWithVersions(), TYPO3\CMS\Extensionmanager\Tests\Unit\Utility\DependencyUtilityTest\isAvailableVersionCompatibleCallsIsVersionCompatibleWithExtensionVersion(), TYPO3\CMS\Extensionmanager\Tests\Unit\Utility\DependencyUtilityTest\isDownloadableVersionCompatibleReturnsFalseIfIncompatibleVersionExists(), TYPO3\CMS\Extensionmanager\Tests\Unit\Utility\DependencyUtilityTest\isDownloadableVersionCompatibleReturnsTrueIfCompatibleVersionExists(), and TYPO3\CMS\Extensionmanager\Tests\Unit\Domain\Model\DependencyTest\isVersionCompatibleReturnsCorrectResult().

◆ getHighestVersion()

◆ getHighestVersionAsInteger()

◆ getIdentifier()

◆ getLowestVersion()

◆ getLowestVersionAsInteger()

◆ getType()

TYPO3\CMS\Extensionmanager\Domain\Model\Dependency::getType ( )

◆ isVersionCompatible()

bool TYPO3\CMS\Extensionmanager\Domain\Model\Dependency::isVersionCompatible ( string  $version)

Compares the given version number against the lowest and highest possible version number of this dependency (e.g. "typo3") to determine if the given version is "compatible".

Parameters
string$version
Returns
‪bool TRUE if the version number is compatible

Definition at line 127 of file Dependency.php.

Referenced by TYPO3\CMS\Extensionmanager\Utility\DependencyUtility\isAvailableVersionCompatible(), TYPO3\CMS\Extensionmanager\Utility\DependencyUtility\isLoadedVersionCompatible(), and TYPO3\CMS\Extensionmanager\ViewHelpers\ConstraintsViewHelper\isVersionCompatible().

Member Data Documentation

◆ $dependencyTypes

array TYPO3\CMS\Extensionmanager\Domain\Model\Dependency::$dependencyTypes
staticprotected
Initial value:
= array(
'depends',
'conflicts',
'suggests',
)

Definition at line 47 of file Dependency.php.

◆ $highestVersion

string TYPO3\CMS\Extensionmanager\Domain\Model\Dependency::$highestVersion = ''
protected

◆ $identifier

◆ $lowestVersion

string TYPO3\CMS\Extensionmanager\Domain\Model\Dependency::$lowestVersion = ''
protected

◆ $specialDependencies

array TYPO3\CMS\Extensionmanager\Domain\Model\Dependency::$specialDependencies
static

◆ $type

string TYPO3\CMS\Extensionmanager\Domain\Model\Dependency::$type = ''
protected