Math_Random
[ class tree: Math_Random ] [ index: Math_Random ] [ all elements ]

Class: Math_Random_PHPrand

Source Location: /Math/Random/PHPrand.php

Class Overview

Math_Random
   |
   --Math_Random_PHPrand

Object-oriented interface to the PHP rand() function


Author(s):

Copyright:

  • 2005 Ants Aasma

Methods


Inherited Methods

Class: Math_Random

Math_Random::getFloat()
Return a random float
Math_Random::getInteger()
Return a random integer
Math_Random::getMaxInteger()
Return maximum supported integer
Math_Random::getMinInteger()
Return minimum supported integer
Math_Random::getString()
Get a string of random characters

Class Details

[line 54]
Object-oriented interface to the PHP rand() function

An object oriented interface to PHP's rand() function using libc's rand() function. No real reason to prefer this to Math_Random_Mtrand.




Tags:

license:  BSD License (3 Clause)
copyright:  2005 Ants Aasma
author:  Ants Aasma <ants.aasma@gmail.com>


[ Top ]


Class Methods


method getInteger [line 111]

int getInteger( int $min, int $max)

Return a random integer

Returns a random integer between $min and $max (inclusive).




Tags:

return:  Random integer


Overrides Math_Random::getInteger() (Return a random integer)

Parameters:

int   $min   minimum value of the random number
int   $max   maximum value of the random number

[ Top ]

method getMaxInteger [line 97]

int getMaxInteger( )

Return maximum supported integer

The value returned by this function is the upper limit to the getInteger method parameters. Values above this are not supported by the used class and will most likely not work.




Tags:

return:  Minimum supported integer


Overrides Math_Random::getMaxInteger() (Return maximum supported integer)

[ Top ]

method getMinInteger [line 83]

int getMinInteger( )

Return minimum supported integer

The value returned by this function is the lower limit to the getInteger method parameters. Values below this are not supported by the used class and will most likely not work.




Tags:

return:  Minimum supported integer


Overrides Math_Random::getMinInteger() (Return minimum supported integer)

[ Top ]

method getString [line 64]

string getString( int $len)

Get a string of random characters

Returns a binary string of 8bit characters with the specified length.




Tags:

return:  string of random characters


Overrides Math_Random::getString() (Get a string of random characters)

Parameters:

int   $len   Length of string to return

[ Top ]


Documentation generated on Sun, 09 Oct 2005 06:53:24 +0300 by phpDocumentor 1.3.0RC3