protected function generateId()
    {
        static $choices = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
        $id = '';
        while (strlen($id) < 9) {
            $id .= $choices[ mt_rand(0, strlen($choices) - 1) ];
        }
        return $id;
    }
protected function generateId()
    {
        static $choices = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
        $id = '';
        while (strlen($id) < 9) {
            $id .= $choices[ mt_rand(0, strlen($choices) - 1) ];
        }
        return $id;
    }
protected function generateId ( ) { static $ choices = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' ; $ id = '' ; while ( strlen ( $ id ) < 9 ) { $ id .= $ choices [ mt_rand ( 0 , strlen ( $ choices ) - 1 ) ] ; } return $ id ; }
Generates a random, unique ID for a document. The result is returned in
base62. This keeps it shorted but still human readable if shared in URLs.

@return string The generated ID.
Generates a random unique ID for a document . The result is returned in base62 . This keeps it shorted but still human readable if shared in URLs .