Some months ago I presented in “UUID component for CakePHP” a simple component to generate UUIDs (Universally Unique Identifiers). With changeset 5552, this component has become obsolete, at least if you are using CakePHP 1.2. The new introduced class “String” provides an easy way to generate UUIDs:

$uuid = String::uuid();

This function can be used anywhere, without including anything.