protected function calculateUuid($input)
    {
        try {
            // Generate a version 5 (name-based and hashed with SHA1) UUID object
            $uuid5 = Uuid::uuid5(Uuid::NAMESPACE_DNS, $input);
            $uuid  = $uuid5->toString();
        } catch (UnsatisfiedDependencyException $e) {
            $uuid = sha1($input);
        }

        return $uuid;
    }
protected function calculateUuid($input)
    {
        try {
            // Generate a version 5 (name-based and hashed with SHA1) UUID object
            $uuid5 = Uuid::uuid5(Uuid::NAMESPACE_DNS, $input);
            $uuid  = $uuid5->toString();
        } catch (UnsatisfiedDependencyException $e) {
            $uuid = sha1($input);
        }

        return $uuid;
    }
protected function calculateUuid ( $ input ) { try { // Generate a version 5 (name-based and hashed with SHA1) UUID object $ uuid5 = Uuid :: uuid5 ( Uuid :: NAMESPACE_DNS , $ input ) ; $ uuid = $ uuid5 -> toString ( ) ; } catch ( UnsatisfiedDependencyException $ e ) { $ uuid = sha1 ( $ input ) ; } return $ uuid ; }
Calculates a UUID for a passed string.

@param string $input The input to calculate the UUID for.

@author Benjamin Carl <opensource@clickalicious.de>

@return string The UUID
Calculates a UUID for a passed string .