protected function RandomGeneratorTrait::getRandomGenerator in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/simpletest/src/RandomGeneratorTrait.php \Drupal\simpletest\RandomGeneratorTrait::getRandomGenerator()
Gets the random generator for the utility methods.
Return value
\Drupal\Component\Utility\Random The random generator.
File
- core/
modules/ simpletest/ src/ RandomGeneratorTrait.php, line 124 - Contains \Drupal\simpletest\RandomGeneratorTrait.
Class
- RandomGeneratorTrait
- Provides random generator utility methods.
Namespace
Drupal\simpletestCode
protected function getRandomGenerator() {
if (!is_object($this->randomGenerator)) {
$this->randomGenerator = new Random();
}
return $this->randomGenerator;
}