Add docblocks for classes and interfaces in Ramsey\Uuid\Provider namespace

This commit is contained in:
Ben Ramsey
2015-09-27 13:02:30 -05:00
parent 36ebfcfc93
commit d975f0f143
7 changed files with 93 additions and 5 deletions
@@ -16,15 +16,34 @@ namespace Ramsey\Uuid\Provider\Node;
use Ramsey\Uuid\Provider\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
*/
class FallbackNodeProvider implements NodeProviderInterface
{
/**
* @var NodeProviderInterface[]
*/
private $nodeProviders;
/**
* Constructs a `FallbackNodeProvider` using an array of node providers
*
* @param NodeProviderInterface[] $providers Array of node providers
*/
public function __construct(array $providers)
{
$this->nodeProviders = $providers;
}
/**
* Returns the system node ID by iterating over an array of node providers
* and returning the first non-empty value found
*
* @return string System node ID as a hexadecimal string
*/
public function getNode()
{
foreach ($this->nodeProviders as $provider) {