Random::MAXIMUM_TRIES

Same name in other branches
  1. 9 core/lib/Drupal/Component/Utility/Random.php \Drupal\Component\Utility\Random::MAXIMUM_TRIES
  2. 8.9.x core/lib/Drupal/Component/Utility/Random.php \Drupal\Component\Utility\Random::MAXIMUM_TRIES
  3. 10 core/lib/Drupal/Component/Utility/Random.php \Drupal\Component\Utility\Random::MAXIMUM_TRIES

The maximum number of times name() and string() can loop.

This prevents infinite loops if the length of the random value is very small.

See also

\Drupal\Tests\Component\Utility\RandomTest

File

core/lib/Drupal/Component/Utility/Random.php, line 20

Class

Random
Defines a utility class for creating random data.

Namespace

Drupal\Component\Utility

Code

const MAXIMUM_TRIES = 100;

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.