FallbackNodeProvider
in package
implements
NodeProviderInterface
FallbackNodeProvider attempts to gain the system host ID from an array of providers, falling back to the next in line in the event a host ID can not be obtained
Interfaces, Classes and Traits
- NodeProviderInterface
- NodeProviderInterface provides functionality to get the node ID (or host ID in the form of the system's MAC address) from a specific type of node provider
Table of Contents
- $nodeProviders : array<string|int, NodeProviderInterface>
- __construct() : mixed
- Constructs a `FallbackNodeProvider` using an array of node providers
- getNode() : string
- Returns the system node ID by iterating over an array of node providers and returning the first non-empty value found
Properties
$nodeProviders
private
array<string|int, NodeProviderInterface>
$nodeProviders
Methods
__construct()
Constructs a `FallbackNodeProvider` using an array of node providers
public
__construct(array<string|int, NodeProviderInterface> $providers) : mixed
Parameters
- $providers : array<string|int, NodeProviderInterface>
-
Array of node providers
Return values
mixed —getNode()
Returns the system node ID by iterating over an array of node providers and returning the first non-empty value found
public
getNode() : string
Tags
Return values
string —System node ID as a hexadecimal string