Simple and safe random getters to copy-paste
string randomBytes( int $length )
int randomInt ( int $min , int $max )
string randomUuid ( void )
<?php | |
/** | |
* UUID class | |
* | |
* The following class generates VALID RFC 4122 COMPLIANT | |
* Universally Unique IDentifiers (UUID) version 3, 4 and 5. | |
* | |
* UUIDs generated validates using OSSP UUID Tool, and output | |
* for named-based UUIDs are exactly the same. This is a pure | |
* PHP implementation. |
var PackageLoader = function() { | |
this.cb = Math.random(0, 100000000000); | |
this.current = 0; | |
this.batches = []; | |
// Load kicks off the entire loading process. | |
this.load = function(config, loadMap, onload) { | |
var scope = this; | |
for(label in loadMap) { | |
scope.batches.push(new PackageBatch(label, loadMap[label])); |