\CryptoManana\Core\Abstractions\ContainersAbstractRandomnessInjectable

Class AbstractRandomnessInjectable - Abstraction container for dependency injection of data generator services.

Summary

Methods
Properties
Constants
setRandomGenerator()
getRandomGenerator()
__construct()
__destruct()
__clone()
seedRandomGenerator()
No public properties found
No constants found
No protected methods found
$randomnessSource
N/A
No private methods found
No private properties found
N/A

Properties

Methods

setRandomGenerator()

setRandomGenerator(\CryptoManana\Core\Abstractions\Randomness\AbstractGenerator  $generator) : $this

Setter for the pseudo-random generator service.

Parameters

\CryptoManana\Core\Abstractions\Randomness\AbstractGenerator $generator

The pseudo-random generator service.

Returns

$this —

The container object.

__construct()

__construct(\CryptoManana\Core\Abstractions\Randomness\AbstractGenerator|null  $generator = null) 

Container constructor.

Parameters

\CryptoManana\Core\Abstractions\Randomness\AbstractGenerator|null $generator

The pseudo-random generator service.

Throws

\Exception

Initialization validation.

__destruct()

__destruct() 

Container destructor.

__clone()

__clone() 

Container cloning via deep copy.

seedRandomGenerator()

seedRandomGenerator(null|integer  $seed = null) : $this

Pass a seed value to the pseudo-randomness generator service.

Parameters

null|integer $seed

Seed value in integer format or null for auto-seeding.

Throws

\Exception

Validation errors and service misuse.

Returns

$this —

The container object.