Download the PHP package haistudio/predictable-random without Composer
On this page you can find all versions of the php package haistudio/predictable-random. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download haistudio/predictable-random
More information about haistudio/predictable-random
Files in haistudio/predictable-random
Download haistudio/predictable-random
More information about haistudio/predictable-random
Files in haistudio/predictable-random
Vendor haistudio
Package predictable-random
Short Description Generates a predictable random number based on a starting seed.
License MIT
Package predictable-random
Short Description Generates a predictable random number based on a starting seed.
License MIT
Please rate this library. Is it a good library?
Informations about the package predictable-random
Predictable Random plugin for Craft CMS 3.x
Generates a predictable random number (or item in an array) based on a starting seed. For when you want things to seem random, but not really be random.
Requirements
This plugin requires Craft CMS 3.0.0-beta.23 or later.
Installation
To install the plugin, follow these instructions.
-
Open your terminal and go to your Craft project:
cd /path/to/project
-
Then tell Composer to load the plugin:
composer require haistudio/predictable-random
- In the Control Panel, go to Settings → Plugins and click the “Install” button for Predictable Random.
Configuring Predictable Random
Set a seed with:
{% do setPredictableRandomSeed(666) %}
Get current seed value with:
{% do getPredictableRandomSeed() %}
Get a random number within a range:
{% set number = predictableRandom(min, max) %}
Or get a random value from an array of possible values:
{% set number = predictableRandom([0,2,4,8,16,'bad','code']) %}
Predictable Random Roadmap
None whatsoever.
All versions of predictable-random with dependencies
PHP Build Version
Package Version
Requires
craftcms/cms Version
~3.0.0
The package haistudio/predictable-random contains the following files
Loading the files please wait ....