Initial Leenooks Module for Kohana
This commit is contained in:
17
classes/lnApp/Random.php
Normal file
17
classes/lnApp/Random.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php defined('SYSPATH') or die('No direct access allowed.');
|
||||
|
||||
/**
|
||||
* This class is for generating Random data.
|
||||
*
|
||||
* @package lnApp
|
||||
* @category lnApp/Helpers
|
||||
* @author Deon George
|
||||
* @copyright (c) 2009-2013 Deon George
|
||||
* @license http://dev.leenooks.net/license.html
|
||||
*/
|
||||
abstract class lnApp_Random {
|
||||
public static function char($num=NULL) {
|
||||
return substr(md5(rand()),0,is_null($num) ? rand(6,10) : $num-1);
|
||||
}
|
||||
}
|
||||
?>
|
Reference in New Issue
Block a user