DB Namespace


Sub-namespaces


Classes


Fixture

constructor

With the help of this method you can create a new instance of Fixture.

Signature

constructor(void) : Object|Fixture

Returns

  • Object, Fixture
    • A new instance of Fixture

word

Generate one random word.

Signature

word(Integer amount) : String

Parameters

  • amount
    • How many words to generate
    • Type: Integer

Returns

  • String
    • The return value is not further described

wordgroup

Generate one random wordgroup.

Signature

wordgroup(Integer amount) : String

Parameters

  • amount
    • How many words to generate
    • Type: Integer

Returns

  • String
    • The return value is not further described

tld

Generate a random top-level-domain.

Signature

tld(void) : String

Returns

  • String
    • The return value is not further described

domain

Generate a random domain name.

Signature

domain(void) : String

Returns

  • String
    • The return value is not further described

email

Generate a random email address.

Signature

email(void) : String

Returns

  • String
    • The return value is not further described

fullname

Generate a random fullname.

Signature

fullname(void) : String

Returns

  • String
    • The return value is not further described

username

Generate a random username.

Signature

username(void) : String

Returns

  • String
    • The return value is not further described

integer

Generate a random integer.

Signature

integer(void) : Integer

Returns

  • Integer
    • The return value is not further described

float

Generate a random float.

Signature

float(void) : Float

Returns

  • Float
    • The return value is not further described

phone

Generate a random float.

Signature

phone(void) : String

Returns

  • String
    • The return value is not further described

text

Generate a random text.

Signature

text(void) : String

Returns

  • String
    • The return value is not further described

md5

Generate a random md5 hash.

Signature

md5(void) : String

Returns

  • String
    • The return value is not further described

sha512

Generate a random sha512 hash.

Signature

sha512(void) : String

Returns

  • String
    • The return value is not further described

uuid

Generate a UUID.

Signature

uuid(Integer version) : String

Parameters

  • version
    • Version of the UUID (1|4)
    • Type: Integer

Returns

  • String
    • The return value is not further described

boolean

Generate a random boolean.

Signature

boolean(void) : Boolean

Returns

  • Boolean
    • The return value is not further described

date

Generate a random date between 2000-01-01 and now.

Signature

date(void) : Boolean

Returns

  • Boolean
    • The return value is not further described

optional

Generate an optional value (get the value or not).

Signature

optional(Mixed value) : Mixed|Undefined

Parameters

  • value
    • Value to return or not
    • Type: Mixed

Returns

  • Mixed, Undefined
    • The return value is not further described

array

Generate an array of values by given generator.

Signature

array(Integer min, Integer max, Function generator) : Array

Parameters

  • min
    • Min amount of values
    • Type: Integer
  • max
    • Max amount of values
    • Type: Integer
  • generator
    • Function to call for values
    • Type: Function

Returns

  • Array
    • The return value is not further described