phpDocumentor InternetAccessLog
[ class tree: InternetAccessLog ] [ index: InternetAccessLog ] [ all elements ]

Class: RandomElements

Source Location: /RandomElements.class.php

Class RandomElements

Class Overview

This class is used to generate random elements (users, IP's and URL's) to make tests (populate tables in MySQL or collections in MongoDB)

Located in /RandomElements.class.php [line 16]



		
		
		
		

Methods

[ Top ]
Descendants
Child Class Description
MongoRandomElements This class is used to generate random elements (users, IP's and URL's) and save them into MongoDB
MySQLRandomElements This class is used to generate random elements (users, IP's and URL's) and save them into MySQL

[ Top ]
Method Summary
string   getRandomDate()   Return a random date between the two dates passes as parameters. Parameters and return value are English textual datetime descriptions 'Y-m-d H:i:s'
string   getRandomDomain()   Returns a random Internet domain (a www followed by a random string ended by a valid internet
string   getRandomFTPMethod()   Returns a semi random HTTP method (90% will be RETR)
string   getRandomHTTPMethod()   Returns a semi random HTTP method (90% will be GET)
string   getRandomIP()   Returns a random IP (string with 4 numbers between 0 and 255). No check for validity is made
string   getRandomProtocol()   Returns a random protocol (90% will be http)
integer   getRandomRetourCode()   Returns a semirandom return code (90% are 200 return code)
integer   getRandomSize()   Return a random size between 0 and 50K
string   getRandomString()   Returns a random string of the length demanded (10 characters by default)
string   getRandomUser()   Returns a random user, composed of one letter and 6 numbers

[ Top ]
Methods
getRandomDate  [line 166]

  string getRandomDate( string $mindate, string $maxdate  )

Return a random date between the two dates passes as parameters. Parameters and return value are English textual datetime descriptions 'Y-m-d H:i:s'

Parameters:
string   $mindate:  English textual datetime description 'Y-m-d H:i:s' of minimun date
string   $maxdate:  English textual datetime description 'Y-m-d H:i:s' of maximun date


[ Top ]
getRandomDomain  [line 116]

  string getRandomDomain( )

Returns a random Internet domain (a www followed by a random string ended by a valid internet



[ Top ]
getRandomFTPMethod  [line 87]

  string getRandomFTPMethod( )

Returns a semi random HTTP method (90% will be RETR)



[ Top ]
getRandomHTTPMethod  [line 72]

  string getRandomHTTPMethod( )

Returns a semi random HTTP method (90% will be GET)



[ Top ]
getRandomIP  [line 63]

  string getRandomIP( )

Returns a random IP (string with 4 numbers between 0 and 255). No check for validity is made



[ Top ]
getRandomProtocol  [line 102]

  string getRandomProtocol( )

Returns a random protocol (90% will be http)



[ Top ]
getRandomRetourCode  [line 142]

  integer getRandomRetourCode( )

Returns a semirandom return code (90% are 200 return code)



[ Top ]
getRandomSize  [line 156]

  integer getRandomSize( )

Return a random size between 0 and 50K



[ Top ]
getRandomString  [line 130]

  string getRandomString( [integer $length = 10]  )

Returns a random string of the length demanded (10 characters by default)

Parameters:
integer   $length: 


[ Top ]
getRandomUser  [line 52]

  string getRandomUser( )

Returns a random user, composed of one letter and 6 numbers



[ Top ]

Documentation generated on Fri, 12 Apr 2013 12:02:21 +0200 by phpDocumentor 1.4.4