IdeviceDecoderRegistry
in package
FinalYes
Ordered registry of optional domain-specific iDevice decoders.
Table of Contents
Properties
- $decoders : array<int, IdeviceDecoderInterface>
Methods
- __construct() : mixed
- all() : array<int, IdeviceDecoderInterface>
- decode() : array{decoder: string, data: mixed}|null
- Decode with the first supporting decoder.
- register() : self
Properties
$decoders
private
array<int, IdeviceDecoderInterface>
$decoders
= []
Methods
__construct()
public
__construct([array<int, IdeviceDecoderInterface> $decoders = [] ]) : mixed
Parameters
- $decoders : array<int, IdeviceDecoderInterface> = []
-
Initial decoders.
all()
public
all() : array<int, IdeviceDecoderInterface>
Return values
array<int, IdeviceDecoderInterface>decode()
Decode with the first supporting decoder.
public
decode(array<string, mixed> $idevice) : array{decoder: string, data: mixed}|null
Parameters
- $idevice : array<string, mixed>
-
Normalized iDevice.
Return values
array{decoder: string, data: mixed}|nullregister()
public
register(IdeviceDecoderInterface $decoder) : self
Parameters
- $decoder : IdeviceDecoderInterface