/**
	 * Get the value appropriate for INSERT statements.
	 *
	 * @return string
	 */
	public function getInsertValue(){
		if(!$this->value){
			$this->setValueFromApp(\Core\generate_uuid());
		}

		return $this->value;
	}
Exemple #2
0
	/**
	 * Generate a globally unique identifier that can be used as a replacement for an autoinc or similar.
	 *
	 * This method IS compatible with multiple servers on a single codebase!
	 *
	 * An example of a UUID returned by this function would be: "1-c5dbcaaf9db-8d77"
	 *
	 * @since 2.4.2
	 *
	 * @return string
	 */
	public static function GenerateUUID(){
		return \Core\generate_uuid();
	}