removed 'application' folder to have everything in the root directory

This commit is contained in:
Steffen Schröder
2014-09-29 18:20:09 +02:00
parent 1569fd5488
commit 9642433363
284 changed files with 4 additions and 50 deletions

71
libs/FML/UniqueID.php Normal file
View File

@ -0,0 +1,71 @@
<?php
namespace FML;
/**
* Unique ID Model Class
*
* @author steeffeen
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class UniqueID {
/*
* Constants
*/
const PREFIX = 'FML_ID_';
/*
* Static properties
*/
protected static $currentIndex = 0;
/*
* Protected properties
*/
protected $index = null;
/**
* Create a new Unique ID object
*
* @return static
*/
public static function create() {
return new static();
}
/**
* Get a new unique index
*
* @return int
*/
protected static function newIndex() {
self::$currentIndex++;
return self::$currentIndex;
}
/**
* Construct a Unique ID object
*/
public function __construct() {
$this->index = static::newIndex();
}
/**
* Get the Unique ID value
*
* @return string
*/
public function getValue() {
return self::PREFIX . $this->index;
}
/**
* Get the string representation
*
* @return string
*/
public function __toString() {
return $this->getValue();
}
}