PackageIdentifier

final readonly class \TYPO3\CMS\Extensionmanager\Domain\Model\PackageIdentifier

Immutable identity of a remote package: the package key, a concrete version and the remote it originates from. Replaces the database uid as the way the backend addresses a package to be downloaded or installed, so packages can be resolved independently of whether they are persisted locally.

Extbase actions receive this as a typed argument: the generic ObjectConverter maps the request arguments to the constructor, which requires the receiving controllers to allow property mapping for 'packageKey', 'version' and 'remote'.

Table of Contents

Properties

$packageKey  : string
$remote  : string
$version  : string

Methods

__construct()  : mixed
The empty defaults exist for the property mapper only: a request not carrying all three arguments must end up as a validation error, not as a property mapping exception.
toArray()  : array{packageKey: string, version: string, remote: string}
The identifier as request arguments, ready to be handed to a URI builder or a forwarded request. The keys match the constructor arguments the property mapper maps back to.

Properties

Methods

__construct()

The empty defaults exist for the property mapper only: a request not carrying all three arguments must end up as a validation error, not as a property mapping exception.

public __construct([string $packageKey = '' ][, string $version = '' ][, string $remote = '' ]) : mixed

Parameters

$packageKey : string = ''
$version : string = ''
$remote : string = ''

toArray()

The identifier as request arguments, ready to be handed to a URI builder or a forwarded request. The keys match the constructor arguments the property mapper maps back to.

public toArray() : array{packageKey: string, version: string, remote: string}

Return values

array{packageKey: string, version: string, remote: string}
On this page