Download the PHP package gamebetr/provable without Composer

On this page you can find all versions of the php package gamebetr/provable. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package provable

Provable

This package provides the means to create provibly fair random numbers and provably fair random shuffles.

Installation

via composer:

Basic Useage

Methods

__construct(string $clientSeed = null, string $serverSeed = null, int $min = 0, int $max = 0, string $type = 'number')

The class constructor takes the optional parameters, clientSeed, serverSeed, min, max, and type. If clientSeed or serverSeed are not provided, it will generate random seeds automatically. The min and max parameters are the minimum and maximum values of the random number or shuffle. Type is either number or shuffle.

static init(string $clientSeed = null, string $serverSeed = null, int $min = 0, int $max = 0, string $type = 'number')

The init method is just a static constructor. It allows you to do the following:

setClientSeed(string $clientSeed = null)

This sets the client seed. If no seed is provided, one will be automatically generated. The Provable instance is returned allowing you to chain commands.

getClientSeed()

This returns the current client seed.

setServerSeed(string $serverSeed = null)

This sets the server seed. If no seed is provided, one will be automatically generated. The Provable instance is returned allowing you to chain commands.

getServerSeed()

This returns the current server seed.

getHashedServerSeed()

This returns the hashed version of the server seed.

setMin(int $min)

This sets the minimum value property. The Provable instance is returned allowing you to chain commands.

getMin()

This returns the current minimum value property.

setMax(int $max)

This sets the maximum value property. The Provable instance is returned allowing you to chain commands.

getMax()

This returns the current maximum value property.

setType(string $type)

This sets the type property. Allowed values are number and shuffle. The Provable instance is returned allowing you to chain commands.

getType()

This returns the current type property.

results()

This calculates the random number or shuffle and returns it.

number(int $minimumNumber = null, int $maximumNumber = null)

This generates a random number between $minimumNumber and $maximumNumber. If no values are provided, it will use the $min and $max properties of the object.

shuffle(int $minimumNumber = null, int $maximumNumber = null)

This generates a random shuffle of numbers between $minimumNumber and $maximumNumber. If no values are provided, it will use the $min and $max properties of the object.


All versions of provable with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package gamebetr/provable contains the following files

Loading the files please wait ....