コード例 #1
0
ファイル: StringCodec.php プロジェクト: 00f100/uuid
 /**
  * Encodes a UuidInterface as a binary representation of a UUID
  *
  * @param UuidInterface $uuid
  * @return string Binary string representation of a UUID
  */
 public function encodeBinary(UuidInterface $uuid)
 {
     return hex2bin($uuid->getHex());
 }
コード例 #2
0
ファイル: V4Formatter.php プロジェクト: ramsey/uuid-console
 public function getContent(UuidInterface $uuid)
 {
     return array(array('', 'content:', substr(chunk_split($uuid->getHex(), 2, ':'), 0, -1)), array('', '', '(no semantics: random data only)'));
 }
コード例 #3
0
ファイル: V3Formatter.php プロジェクト: ramsey/uuid-console
 public function getContent(UuidInterface $uuid)
 {
     return array(array('', 'content:', substr(chunk_split($uuid->getHex(), 2, ':'), 0, -1)), array('', '', '(not decipherable: MD5 message digest only)'));
 }
コード例 #4
0
ファイル: Uuid.php プロジェクト: inklabs/kommerce-core
 /**
  * @return string
  */
 public function getHex()
 {
     return $this->ramseyUuid->getHex();
 }