FallbackExtensionCatalogue
readonly class \
- Implements
- ExtensionCatalogueInterface
Asks a catalogue that reads a remote live, and falls back to one that reads the locally imported list whenever the remote cannot answer - because the installation is offline, the remote is down, a proxy blocks it or a rate limit was reached - or sends a version constraint that cannot be converted.
With "offlineMode" enabled, the remote is not asked at all.
This is what keeps browsing no worse than it was before the remote was consulted at all: the imported list stays a complete answer, only an older one. In offline mode the remote is not asked in the first place.
Internal
This class is a specific ExtensionManager implementation and is not part of the Public TYPO3 API.
Table of Contents
Interfaces
- ExtensionCatalogueInterface
- The catalogue of extensions offered for installation, as the "Get Extensions" module browses it: one page of the list at a time, the search, the versions of a single extension and the distributions.
Methods
- __construct() : mixed
- countAll() : int
- The number of extensions {@see findAll} pages through.
- countByTitleOrAuthorNameOrExtensionKey() : int
- The number of extensions {@see findByTitleOrAuthorNameOrExtensionKey} pages through.
- findAll() : Extension[]
- One page of the catalogue, newest extension first.
- findAllCommunityDistributions() : Extension[]
- The distributions published by anyone else.
- findAllOfficialDistributions() : Extension[]
- The distributions published by the TYPO3 CMS team.
- findByExtensionKeyOrderedByVersion() : Extension[]
- All versions of a single extension, highest version first.
- findByTitleOrAuthorNameOrExtensionKey() : Extension[]
- One page of the extensions matching a search term, most relevant first.
- findOneByCurrentVersionByExtensionKey() : Extension|null
- The version of an extension that is currently offered for installation, or null if the catalogue does not know the extension.
Methods
__construct()
public
__construct(ExtensionCatalogueInterface $remoteCatalogue, ExtensionCatalogueInterface $localCatalogue, LoggerInterface $logger, ExtensionConfiguration $extensionConfiguration) : mixed
Parameters
- $remoteCatalogue : ExtensionCatalogueInterface
- $localCatalogue : ExtensionCatalogueInterface
- $logger : LoggerInterface
- $extensionConfiguration : ExtensionConfiguration
countAll()
The number of extensions {@see findAll} pages through.
public
countAll() : int
Return values
intcountByTitleOrAuthorNameOrExtensionKey()
The number of extensions {@see findByTitleOrAuthorNameOrExtensionKey} pages through.
public
countByTitleOrAuthorNameOrExtensionKey(string $searchString) : int
Parameters
- $searchString : string
Return values
intfindAll()
One page of the catalogue, newest extension first.
public
findAll(int $offset, int $limit) : Extension[]
Parameters
- $offset : int
- $limit : int
Return values
Extension[]findAllCommunityDistributions()
The distributions published by anyone else.
public
findAllCommunityDistributions([bool $showUnsuitableDistributions = false ]) : Extension[]
Parameters
- $showUnsuitableDistributions : bool = false
Return values
Extension[]findAllOfficialDistributions()
The distributions published by the TYPO3 CMS team.
public
findAllOfficialDistributions([bool $showUnsuitableDistributions = false ]) : Extension[]
Parameters
- $showUnsuitableDistributions : bool = false
Return values
Extension[]findByExtensionKeyOrderedByVersion()
All versions of a single extension, highest version first.
public
findByExtensionKeyOrderedByVersion(string $extensionKey) : Extension[]
Parameters
- $extensionKey : string
Return values
Extension[]findByTitleOrAuthorNameOrExtensionKey()
One page of the extensions matching a search term, most relevant first.
public
findByTitleOrAuthorNameOrExtensionKey(string $searchString, int $offset, int $limit) : Extension[]
Parameters
- $searchString : string
- $offset : int
- $limit : int
Return values
Extension[]findOneByCurrentVersionByExtensionKey()
The version of an extension that is currently offered for installation, or null if the catalogue does not know the extension.
public
findOneByCurrentVersionByExtensionKey(string $extensionKey) : Extension|null
Parameters
- $extensionKey : string