class Com

Same name in other branches
  1. 9 core/lib/Drupal/Component/Uuid/Com.php \Drupal\Component\Uuid\Com
  2. 10 core/lib/Drupal/Component/Uuid/Com.php \Drupal\Component\Uuid\Com
  3. 11.x core/lib/Drupal/Component/Uuid/Com.php \Drupal\Component\Uuid\Com

Generates a UUID using the Windows internal GUID extension.

Hierarchy

Expanded class hierarchy of Com

See also

http://php.net/com_create_guid

1 file declares its use of Com
UuidTest.php in core/tests/Drupal/Tests/Component/Uuid/UuidTest.php
2 string references to 'Com'
CategoryAutocompleteTest::providerTestAutocompleteSuggestions in core/modules/block/tests/src/Unit/CategoryAutocompleteTest.php
Data provider for testAutocompleteSuggestions().
LinkItem::generateSampleValue in core/modules/link/src/Plugin/Field/FieldType/LinkItem.php
Generates placeholder field values.

File

core/lib/Drupal/Component/Uuid/Com.php, line 10

Namespace

Drupal\Component\Uuid
View source
class Com implements UuidInterface {
    
    /**
     * {@inheritdoc}
     */
    public function generate() {
        // Remove {} wrapper and make lower case to keep result consistent.
        return strtolower(trim(com_create_guid(), '{}'));
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
Com::generate public function Generates a Universally Unique IDentifier (UUID). Overrides UuidInterface::generate

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.