mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-24 11:59:09 -04:00
ALPHA 3.0.2a
This commit is contained in:
28
vendor/ramsey/uuid/src/Uuid.php
vendored
28
vendor/ramsey/uuid/src/Uuid.php
vendored
@@ -229,6 +229,7 @@ class Uuid implements UuidInterface
|
||||
*
|
||||
* @param string $serialized
|
||||
* @link http://php.net/manual/en/class.serializable.php
|
||||
* @throws \Ramsey\Uuid\Exception\InvalidUuidStringException
|
||||
*/
|
||||
public function unserialize($serialized)
|
||||
{
|
||||
@@ -332,6 +333,9 @@ class Uuid implements UuidInterface
|
||||
return $this->converter;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function getDateTime()
|
||||
{
|
||||
if ($this->getVersion() != 1) {
|
||||
@@ -384,6 +388,9 @@ class Uuid implements UuidInterface
|
||||
return str_replace('-', '', $this->toString());
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function getInteger()
|
||||
{
|
||||
return $this->converter->fromHex($this->getHex());
|
||||
@@ -393,6 +400,7 @@ class Uuid implements UuidInterface
|
||||
* Returns the least significant 64 bits of this UUID's 128 bit value.
|
||||
*
|
||||
* @return mixed Converted representation of the unsigned 64-bit integer value
|
||||
* @throws \Ramsey\Uuid\Exception\UnsatisfiedDependencyException if `Moontoast\Math\BigNumber` is not present
|
||||
*/
|
||||
public function getLeastSignificantBits()
|
||||
{
|
||||
@@ -413,6 +421,7 @@ class Uuid implements UuidInterface
|
||||
* Returns the most significant 64 bits of this UUID's 128 bit value.
|
||||
*
|
||||
* @return mixed Converted representation of the unsigned 64-bit integer value
|
||||
* @throws \Ramsey\Uuid\Exception\UnsatisfiedDependencyException if `Moontoast\Math\BigNumber` is not present
|
||||
*/
|
||||
public function getMostSignificantBits()
|
||||
{
|
||||
@@ -534,6 +543,9 @@ class Uuid implements UuidInterface
|
||||
return hexdec($this->getTimestampHex());
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function getTimestampHex()
|
||||
{
|
||||
if ($this->getVersion() != 1) {
|
||||
@@ -612,6 +624,8 @@ class Uuid implements UuidInterface
|
||||
*
|
||||
* @param string $bytes
|
||||
* @return UuidInterface
|
||||
* @throws \Ramsey\Uuid\Exception\InvalidUuidStringException
|
||||
* @throws \InvalidArgumentException
|
||||
*/
|
||||
public static function fromBytes($bytes)
|
||||
{
|
||||
@@ -623,6 +637,7 @@ class Uuid implements UuidInterface
|
||||
*
|
||||
* @param string $name A string that specifies a UUID
|
||||
* @return UuidInterface
|
||||
* @throws \Ramsey\Uuid\Exception\InvalidUuidStringException
|
||||
*/
|
||||
public static function fromString($name)
|
||||
{
|
||||
@@ -634,6 +649,8 @@ class Uuid implements UuidInterface
|
||||
*
|
||||
* @param string $integer String representation of 128-bit integer
|
||||
* @return UuidInterface
|
||||
* @throws \Ramsey\Uuid\Exception\UnsatisfiedDependencyException if `Moontoast\Math\BigNumber` is not present
|
||||
* @throws \Ramsey\Uuid\Exception\InvalidUuidStringException
|
||||
*/
|
||||
public static function fromInteger($integer)
|
||||
{
|
||||
@@ -654,7 +671,7 @@ class Uuid implements UuidInterface
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!preg_match('/' . self::VALID_PATTERN . '/', $uuid)) {
|
||||
if (!preg_match('/' . self::VALID_PATTERN . '/D', $uuid)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -670,6 +687,10 @@ class Uuid implements UuidInterface
|
||||
* could arise when the clock is set backwards in time or if the node ID
|
||||
* changes.
|
||||
* @return UuidInterface
|
||||
* @throws \Ramsey\Uuid\Exception\UnsatisfiedDependencyException if called on a 32-bit system and
|
||||
* `Moontoast\Math\BigNumber` is not present
|
||||
* @throws \InvalidArgumentException
|
||||
* @throws \Exception if it was not possible to gather sufficient entropy
|
||||
*/
|
||||
public static function uuid1($node = null, $clockSeq = null)
|
||||
{
|
||||
@@ -683,6 +704,7 @@ class Uuid implements UuidInterface
|
||||
* @param string $ns The UUID namespace in which to create the named UUID
|
||||
* @param string $name The name to create a UUID for
|
||||
* @return UuidInterface
|
||||
* @throws \Ramsey\Uuid\Exception\InvalidUuidStringException
|
||||
*/
|
||||
public static function uuid3($ns, $name)
|
||||
{
|
||||
@@ -693,6 +715,9 @@ class Uuid implements UuidInterface
|
||||
* Generate a version 4 (random) UUID.
|
||||
*
|
||||
* @return UuidInterface
|
||||
* @throws \Ramsey\Uuid\Exception\UnsatisfiedDependencyException if `Moontoast\Math\BigNumber` is not present
|
||||
* @throws \InvalidArgumentException
|
||||
* @throws \Exception
|
||||
*/
|
||||
public static function uuid4()
|
||||
{
|
||||
@@ -706,6 +731,7 @@ class Uuid implements UuidInterface
|
||||
* @param string $ns The UUID namespace in which to create the named UUID
|
||||
* @param string $name The name to create a UUID for
|
||||
* @return UuidInterface
|
||||
* @throws \Ramsey\Uuid\Exception\InvalidUuidStringException
|
||||
*/
|
||||
public static function uuid5($ns, $name)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user