src/Codec/GuidStringCodec.php
public function encode(UuidInterface $uuid)
    {
        $components = array_values($uuid->getFieldsHex());

        // Swap byte-order on the first three fields
        $this->swapFields($components);

        return vsprintf(
            '%08s-%04s-%04s-%02s%02s-%012s',
            $components
        );
    }
public function encode(UuidInterface $uuid)
    {
        $components = array_values($uuid->getFieldsHex());

        // Swap byte-order on the first three fields
        $this->swapFields($components);

        return vsprintf(
            '%08s-%04s-%04s-%02s%02s-%012s',
            $components
        );
    }
public function encode ( UuidInterface $ uuid ) { $ components = array_values ( $ uuid -> getFieldsHex ( ) ) ; // Swap byte-order on the first three fields $ this -> swapFields ( $ components ) ; return vsprintf ( '%08s-%04s-%04s-%02s%02s-%012s' , $ components ) ; }
Encodes a UuidInterface as a string representation of a GUID

@param UuidInterface $uuid
@return string Hexadecimal string representation of a GUID
Encodes a UuidInterface as a string representation of a GUID