Kraken\Util\Support\GeneratorSupport::genId PHP Method

genId() public static method

Return uniqid prefixed with given string.
public static genId ( string $name ) : string
$name string
return string
    public static function genId($name)
    {
        return uniqid($name, true);
    }

Usage Example

 /**
  * @return int
  */
 protected function getNextSuffix()
 {
     if ($this->counter > 2000000000.0) {
         $this->counter = 1000000000.0;
         $this->seed = GeneratorSupport::genId($this->name);
     }
     return (string) $this->counter++;
 }
GeneratorSupport