Skip to content

Repository files navigation

Token

Build Status

A handful of tools for PHP developers.

Requirements

This library uses PHP 5.4+.

Installation

It is recommended that you install the Token library through composer. To do so, add the following lines to your composer.json file.

{
"require": {
"sinergi/token": "dev-master"
}
}

Usage

useSinergi\Token\StringGenerator;
StringGenerator::randomAlnum(32);

Methods

  • randomAlnum Generate alpha-numeric string

    • Parameters
    • int $length The length of the string to generate
    • Optionalbool $onlyUppercase Use only uppercase letters
  • randomAlpha Generate alpha string

    • Parameters
    • int $length The length of the string to generate
    • Optionalbool $onlyUppercase Use only uppercase letters
  • randomNumeric Generate numeric string

    • Parameters
    • int $length The length of the string to generate
  • randomHexa Generate hexa string

    • Parameters
    • int $length The length of the string to generate
  • randomUuid Generate uuid string

  • randomId Generate id string

About

PHP library to generate random strings

Resources

Stars

17 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages