‪TYPO3CMS  ‪main
TYPO3\CMS\Extensionmanager\Remote\TerExtensionRemote Class Reference
Inheritance diagram for TYPO3\CMS\Extensionmanager\Remote\TerExtensionRemote:
TYPO3\CMS\Extensionmanager\Remote\ExtensionDownloaderRemoteInterface TYPO3\CMS\Extensionmanager\Remote\ListableRemoteInterface

Public Member Functions

 __construct (string $identifier, array $options=[])
 
 getIdentifier ()
 
 getAvailablePackages (bool $force=false)
 
 needsUpdate ()
 
 getLastUpdate ()
 
 downloadExtension (string $extensionKey, string $version, FileHandlingUtility $fileHandler, string $verificationHash=null, string $pathType='Local')
 

Protected Member Functions

 isDownloadedExtensionListUpToDate ()
 
 fetchPackageList ()
 
 downloadFile (string $remotePath)
 
 isDownloadedPackageValid (string $expectedHash, string $fileContents)
 
array decodeExchangeData (string $stream)
 

Protected Attributes

string $identifier
 
string $localExtensionListCacheFile
 
string $remoteBase = 'https://extensions.typo3.org/fileadmin/ter/'
 

Detailed Description

Class for downloading .t3x files from extensions.typo3.org and validating the results. This also includes the ListableRemoteInterface, which means it downloads extensions.xml.gz files and can import it in the database.

This is the only dependency for the concrete TER implementation on extensions.typo3.org and encapsulates the definition where an extension is located in TER.

Not responsible for:

  • ‪installing / activating an extension

Definition at line 38 of file TerExtensionRemote.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Extensionmanager\Remote\TerExtensionRemote::__construct ( string  $identifier,
array  $options = [] 
)

Member Function Documentation

◆ decodeExchangeData()

array TYPO3\CMS\Extensionmanager\Remote\TerExtensionRemote::decodeExchangeData ( string  $stream)
protected

Decodes extension array from t3x file contents. This kind of data is when an extension is uploaded to TER

Parameters
string$stream‪Data stream
Exceptions
VerificationFailedException
Returns
‪array Array with result on success, otherwise an error string.

Definition at line 177 of file TerExtensionRemote.php.

References $output, and TYPO3\CMS\Extensionmanager\Remote\TerExtensionRemote\isDownloadedPackageValid().

Referenced by TYPO3\CMS\Extensionmanager\Remote\TerExtensionRemote\downloadExtension().

◆ downloadExtension()

TYPO3\CMS\Extensionmanager\Remote\TerExtensionRemote::downloadExtension ( string  $extensionKey,
string  $version,
FileHandlingUtility  $fileHandler,
string  $verificationHash = null,
string  $pathType = 'Local' 
)

◆ downloadFile()

◆ fetchPackageList()

TYPO3\CMS\Extensionmanager\Remote\TerExtensionRemote::fetchPackageList ( )
protected

◆ getAvailablePackages()

TYPO3\CMS\Extensionmanager\Remote\TerExtensionRemote::getAvailablePackages ( bool  $force = false)

◆ getIdentifier()

TYPO3\CMS\Extensionmanager\Remote\TerExtensionRemote::getIdentifier ( )

◆ getLastUpdate()

TYPO3\CMS\Extensionmanager\Remote\TerExtensionRemote::getLastUpdate ( )

Get the time when the remote was updated the last time.

Implements TYPO3\CMS\Extensionmanager\Remote\ListableRemoteInterface.

Definition at line 96 of file TerExtensionRemote.php.

Referenced by TYPO3\CMS\Extensionmanager\Remote\TerExtensionRemote\needsUpdate().

◆ isDownloadedExtensionListUpToDate()

TYPO3\CMS\Extensionmanager\Remote\TerExtensionRemote::isDownloadedExtensionListUpToDate ( )
protected

TER provides an extensions.md5 which contains the hashsum of the current remote extensions.gz file. Let's check if this is the same, if so, it is not needed to download a new extensions.gz.

Definition at line 82 of file TerExtensionRemote.php.

References TYPO3\CMS\Extensionmanager\Remote\TerExtensionRemote\downloadFile().

Referenced by TYPO3\CMS\Extensionmanager\Remote\TerExtensionRemote\needsUpdate().

◆ isDownloadedPackageValid()

TYPO3\CMS\Extensionmanager\Remote\TerExtensionRemote::isDownloadedPackageValid ( string  $expectedHash,
string  $fileContents 
)
protected

Validates the integrity of the contents of a downloaded file.

Definition at line 164 of file TerExtensionRemote.php.

Referenced by TYPO3\CMS\Extensionmanager\Remote\TerExtensionRemote\decodeExchangeData(), and TYPO3\CMS\Extensionmanager\Remote\TerExtensionRemote\downloadExtension().

◆ needsUpdate()

TYPO3\CMS\Extensionmanager\Remote\TerExtensionRemote::needsUpdate ( )

Member Data Documentation

◆ $identifier

string TYPO3\CMS\Extensionmanager\Remote\TerExtensionRemote::$identifier
protected

◆ $localExtensionListCacheFile

string TYPO3\CMS\Extensionmanager\Remote\TerExtensionRemote::$localExtensionListCacheFile
protected

Definition at line 41 of file TerExtensionRemote.php.

◆ $remoteBase

string TYPO3\CMS\Extensionmanager\Remote\TerExtensionRemote::$remoteBase = 'https://extensions.typo3.org/fileadmin/ter/'
protected

Definition at line 42 of file TerExtensionRemote.php.