Files
php-uuid/docs/classes/Rhumsaa.Uuid.Uuid.html
T
2013-07-16 10:07:49 -05:00

1140 lines
69 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html><html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
<meta charset="utf-8">
<title>Rhumsaa\Uuid » \Rhumsaa\Uuid\Uuid</title>
<meta name="author" content="Mike van Riel">
<meta name="description" content="">
<link href="../css/template.css" rel="stylesheet" media="all">
<script src="../js/jquery-1.7.1.min.js" type="text/javascript"></script><script src="../js/jquery-ui-1.8.2.custom.min.js" type="text/javascript"></script><script src="../js/jquery.mousewheel.min.js" type="text/javascript"></script><script src="../js/bootstrap.js" type="text/javascript"></script><script src="../js/template.js" type="text/javascript"></script><script src="../js/prettify/prettify.min.js" type="text/javascript"></script><link rel="shortcut icon" href="../img/favicon.ico">
<link rel="apple-touch-icon" href="../img/apple-touch-icon.png">
<link rel="apple-touch-icon" sizes="72x72" href="../img/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="114x114" href="../img/apple-touch-icon-114x114.png">
</head>
<body>
<div class="navbar navbar-fixed-top">
<div class="navbar-inner"><div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></a><a class="brand" href="../index.html">Rhumsaa\Uuid</a><div class="nav-collapse"><ul class="nav">
<li class="dropdown">
<a href="#api" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b></a><ul class="dropdown-menu">
<li><a>Namespaces</a></li>
<li><a href="../namespaces/Rhumsaa.html"><i class="icon-th"></i> Rhumsaa</a></li>
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#charts" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b></a><ul class="dropdown-menu"><li><a href="../graph_class.html"><i class="icon-list-alt"></i> Class hierarchy diagram</a></li></ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#reports" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b></a><ul class="dropdown-menu">
<li><a href="../errors.html"><i class="icon-remove-sign"></i> Errors 
<span class="label label-info">0</span></a></li>
<li><a href="../markers.html"><i class="icon-map-marker"></i> Markers 
<ul><li>todo 
<span class="label label-info">1</span>
</li></ul></a></li>
<li><a href="../deprecated.html"><i class="icon-stop"></i> Deprecated elements 
<span class="label label-info">0</span></a></li>
</ul>
</li>
</ul></div>
</div></div>
<div class="go_to_top"><a href="#___" style="color: inherit">Back to top  <i class="icon-upload icon-white"></i></a></div>
</div>
<div id="___" class="container">
<noscript><div class="alert alert-warning">
Javascript is disabled; several features are only available
if Javascript is enabled.
</div></noscript>
<div class="row">
<div class="span4">
<span class="btn-group visibility" data-toggle="buttons-checkbox"><button class="btn public active" title="Show public elements">Public</button><button class="btn protected" title="Show protected elements">Protected</button><button class="btn private" title="Show private elements">Private</button><button class="btn inherited active" title="Show inherited elements">Inherited</button></span><div class="btn-group view pull-right" data-toggle="buttons-radio">
<button class="btn details" title="Show descriptions and method names"><i class="icon-list"></i></button><button class="btn simple" title="Show only method names"><i class="icon-align-justify"></i></button>
</div>
<ul class="side-nav nav nav-list">
<li class="nav-header">
<i class="icon-custom icon-method"></i> Methods
<ul>
<li class="method public "><a href="#method___toString" title="__toString :: Converts this UUID object to a string when the object is used in any
string context"><span class="description">Converts this UUID object to a string when the object is used in any
string context</span><pre>__toString()</pre></a></li>
<li class="method public "><a href="#method_compareTo" title="compareTo :: Compares this UUID with the specified UUID."><span class="description">Compares this UUID with the specified UUID.</span><pre>compareTo()</pre></a></li>
<li class="method public "><a href="#method_equals" title="equals :: Compares this object to the specified object."><span class="description">Compares this object to the specified object.</span><pre>equals()</pre></a></li>
<li class="method public "><a href="#method_fromBytes" title="fromBytes :: Creates a UUID from a byte string."><span class="description">Creates a UUID from a byte string.</span><pre>fromBytes()</pre></a></li>
<li class="method public "><a href="#method_fromString" title="fromString :: Creates a UUID from the string standard representation as described
in the toString() method."><span class="description">Creates a UUID from the string standard representation as described
in the toString() method.</span><pre>fromString()</pre></a></li>
<li class="method public "><a href="#method_getBytes" title="getBytes :: Returns the UUID as a 16-byte string (containing the six integer fields
in big-endian byte order)"><span class="description">Returns the UUID as a 16-byte string (containing the six integer fields
in big-endian byte order)</span><pre>getBytes()</pre></a></li>
<li class="method public "><a href="#method_getClockSeqHiAndReserved" title="getClockSeqHiAndReserved :: Returns the high field of the clock sequence multiplexed with the variant
(bits 65-72 of the UUID)."><span class="description">Returns the high field of the clock sequence multiplexed with the variant
(bits 65-72 of the UUID).</span><pre>getClockSeqHiAndReserved()</pre></a></li>
<li class="method public "><a href="#method_getClockSeqHiAndReservedHex" title="getClockSeqHiAndReservedHex :: Returns the high field of the clock sequence multiplexed with the variant
(bits 65-72 of the UUID)."><span class="description">Returns the high field of the clock sequence multiplexed with the variant
(bits 65-72 of the UUID).</span><pre>getClockSeqHiAndReservedHex()</pre></a></li>
<li class="method public "><a href="#method_getClockSeqLow" title="getClockSeqLow :: Returns the low field of the clock sequence (bits 73-80 of the UUID)."><span class="description">Returns the low field of the clock sequence (bits 73-80 of the UUID).</span><pre>getClockSeqLow()</pre></a></li>
<li class="method public "><a href="#method_getClockSeqLowHex" title="getClockSeqLowHex :: Returns the low field of the clock sequence (bits 73-80 of the UUID)."><span class="description">Returns the low field of the clock sequence (bits 73-80 of the UUID).</span><pre>getClockSeqLowHex()</pre></a></li>
<li class="method public "><a href="#method_getClockSequence" title="getClockSequence :: Returns the clock sequence value associated with this UUID."><span class="description">Returns the clock sequence value associated with this UUID.</span><pre>getClockSequence()</pre></a></li>
<li class="method public "><a href="#method_getClockSequenceHex" title="getClockSequenceHex :: Returns the clock sequence value associated with this UUID."><span class="description">Returns the clock sequence value associated with this UUID.</span><pre>getClockSequenceHex()</pre></a></li>
<li class="method public "><a href="#method_getDateTime" title="getDateTime :: Returns a PHP DateTime object representing the timestamp associated
with this UUID."><span class="description">Returns a PHP DateTime object representing the timestamp associated
with this UUID.</span><pre>getDateTime()</pre></a></li>
<li class="method public "><a href="#method_getFields" title="getFields :: Returns an array of the fields of this UUID, with keys named according
to the RFC 4122 names for the fields."><span class="description">Returns an array of the fields of this UUID, with keys named according
to the RFC 4122 names for the fields.</span><pre>getFields()</pre></a></li>
<li class="method public "><a href="#method_getFieldsHex" title="getFieldsHex :: Returns an array of the fields of this UUID, with keys named according
to the RFC 4122 names for the fields."><span class="description">Returns an array of the fields of this UUID, with keys named according
to the RFC 4122 names for the fields.</span><pre>getFieldsHex()</pre></a></li>
<li class="method public "><a href="#method_getLeastSignificantBits" title="getLeastSignificantBits :: Returns the least significant 64 bits of this UUID's 128 bit value"><span class="description">Returns the least significant 64 bits of this UUID's 128 bit value</span><pre>getLeastSignificantBits()</pre></a></li>
<li class="method public "><a href="#method_getLeastSignificantBitsHex" title="getLeastSignificantBitsHex :: Returns the least significant 64 bits of this UUID's 128 bit value"><span class="description">Returns the least significant 64 bits of this UUID's 128 bit value</span><pre>getLeastSignificantBitsHex()</pre></a></li>
<li class="method public "><a href="#method_getMostSignificantBits" title="getMostSignificantBits :: Returns the most significant 64 bits of this UUID's 128 bit value"><span class="description">Returns the most significant 64 bits of this UUID's 128 bit value</span><pre>getMostSignificantBits()</pre></a></li>
<li class="method public "><a href="#method_getMostSignificantBitsHex" title="getMostSignificantBitsHex :: Returns the most significant 64 bits of this UUID's 128 bit value"><span class="description">Returns the most significant 64 bits of this UUID's 128 bit value</span><pre>getMostSignificantBitsHex()</pre></a></li>
<li class="method public "><a href="#method_getNode" title="getNode :: Returns the node value associated with this UUID"><span class="description">Returns the node value associated with this UUID</span><pre>getNode()</pre></a></li>
<li class="method public "><a href="#method_getNodeHex" title="getNodeHex :: Returns the node value associated with this UUID"><span class="description">Returns the node value associated with this UUID</span><pre>getNodeHex()</pre></a></li>
<li class="method public "><a href="#method_getTimeHiAndVersion" title="getTimeHiAndVersion :: Returns the high field of the timestamp multiplexed with the version
number (bits 49-64 of the UUID)."><span class="description">Returns the high field of the timestamp multiplexed with the version
number (bits 49-64 of the UUID).</span><pre>getTimeHiAndVersion()</pre></a></li>
<li class="method public "><a href="#method_getTimeHiAndVersionHex" title="getTimeHiAndVersionHex :: Returns the high field of the timestamp multiplexed with the version
number (bits 49-64 of the UUID)."><span class="description">Returns the high field of the timestamp multiplexed with the version
number (bits 49-64 of the UUID).</span><pre>getTimeHiAndVersionHex()</pre></a></li>
<li class="method public "><a href="#method_getTimeLow" title="getTimeLow :: Returns the low field of the timestamp (the first 32 bits of the UUID)."><span class="description">Returns the low field of the timestamp (the first 32 bits of the UUID).</span><pre>getTimeLow()</pre></a></li>
<li class="method public "><a href="#method_getTimeLowHex" title="getTimeLowHex :: Returns the low field of the timestamp (the first 32 bits of the UUID)."><span class="description">Returns the low field of the timestamp (the first 32 bits of the UUID).</span><pre>getTimeLowHex()</pre></a></li>
<li class="method public "><a href="#method_getTimeMid" title="getTimeMid :: Returns the middle field of the timestamp (bits 33-48 of the UUID)."><span class="description">Returns the middle field of the timestamp (bits 33-48 of the UUID).</span><pre>getTimeMid()</pre></a></li>
<li class="method public "><a href="#method_getTimeMidHex" title="getTimeMidHex :: Returns the middle field of the timestamp (bits 33-48 of the UUID)."><span class="description">Returns the middle field of the timestamp (bits 33-48 of the UUID).</span><pre>getTimeMidHex()</pre></a></li>
<li class="method public "><a href="#method_getTimestamp" title="getTimestamp :: The timestamp value associated with this UUID"><span class="description">The timestamp value associated with this UUID</span><pre>getTimestamp()</pre></a></li>
<li class="method public "><a href="#method_getTimestampHex" title="getTimestampHex :: The timestamp value associated with this UUID"><span class="description">The timestamp value associated with this UUID</span><pre>getTimestampHex()</pre></a></li>
<li class="method public "><a href="#method_getUrn" title="getUrn :: Returns the string representation of the UUID as a URN."><span class="description">Returns the string representation of the UUID as a URN.</span><pre>getUrn()</pre></a></li>
<li class="method public "><a href="#method_getVariant" title="getVariant :: Returns the variant number associated with this UUID."><span class="description">Returns the variant number associated with this UUID.</span><pre>getVariant()</pre></a></li>
<li class="method public "><a href="#method_getVersion" title="getVersion :: The version number associated with this UUID."><span class="description">The version number associated with this UUID.</span><pre>getVersion()</pre></a></li>
<li class="method public "><a href="#method_isValid" title="isValid :: Check if a string is a valid uuid"><span class="description">Check if a string is a valid uuid</span><pre>isValid()</pre></a></li>
<li class="method public "><a href="#method_toString" title="toString :: Converts this UUID into a string representation"><span class="description">Converts this UUID into a string representation</span><pre>toString()</pre></a></li>
<li class="method public "><a href="#method_uuid1" title="uuid1 :: Generate a version 1 UUID from a host ID, sequence number, and the current time."><span class="description">Generate a version 1 UUID from a host ID, sequence number, and the current time.</span><pre>uuid1()</pre></a></li>
<li class="method public "><a href="#method_uuid3" title="uuid3 :: Generate a version 3 UUID based on the MD5 hash of a namespace identifier (which
is a UUID) and a name (which is a string)."><span class="description">Generate a version 3 UUID based on the MD5 hash of a namespace identifier (which
is a UUID) and a name (which is a string).</span><pre>uuid3()</pre></a></li>
<li class="method public "><a href="#method_uuid4" title="uuid4 :: Generate a version 4 (random) UUID."><span class="description">Generate a version 4 (random) UUID.</span><pre>uuid4()</pre></a></li>
<li class="method public "><a href="#method_uuid5" title="uuid5 :: Generate a version 5 UUID based on the SHA-1 hash of a namespace identifier (which
is a UUID) and a name (which is a string)."><span class="description">Generate a version 5 UUID based on the SHA-1 hash of a namespace identifier (which
is a UUID) and a name (which is a string).</span><pre>uuid5()</pre></a></li>
</ul>
</li>
<li class="nav-header protected">» Protected
<ul>
<li class="method protected "><a href="#method___construct" title="__construct :: Creates a universally unique identifier (UUID) from the most significant
bits and least significant bits."><span class="description">Creates a universally unique identifier (UUID) from the most significant
bits and least significant bits.</span><pre>__construct()</pre></a></li>
<li class="method protected "><a href="#method_calculateUuidTime" title="calculateUuidTime :: Calculates the UUID time fields from a UNIX timestamp"><span class="description">Calculates the UUID time fields from a UNIX timestamp</span><pre>calculateUuidTime()</pre></a></li>
<li class="method protected "><a href="#method_getNodeFromSystem" title="getNodeFromSystem :: Get the hardware address as a 48-bit positive integer."><span class="description">Get the hardware address as a 48-bit positive integer.</span><pre>getNodeFromSystem()</pre></a></li>
<li class="method protected "><a href="#method_hasBigNumber" title="hasBigNumber :: Returns true if the system has Moontoast\Math\BigNumber"><span class="description">Returns true if the system has Moontoast\Math\BigNumber</span><pre>hasBigNumber()</pre></a></li>
<li class="method protected "><a href="#method_is64BitSystem" title="is64BitSystem :: Returns true if the system is 64-bit, false otherwise"><span class="description">Returns true if the system is 64-bit, false otherwise</span><pre>is64BitSystem()</pre></a></li>
<li class="method protected "><a href="#method_uuidFromHashedName" title="uuidFromHashedName :: Returns a version 3 or 5 UUID based on the hash (md5 or sha1) of a
namespace identifier (which is a UUID) and a name (which is a string)"><span class="description">Returns a version 3 or 5 UUID based on the hash (md5 or sha1) of a
namespace identifier (which is a UUID) and a name (which is a string)</span><pre>uuidFromHashedName()</pre></a></li>
</ul>
</li>
<li class="nav-header">
<i class="icon-custom icon-property"></i> Properties
<ul>
<li class="property public "><a href="#property_force32Bit" title="$force32Bit :: For testing, 64-bit system override; if true, treat the system as 32-bit"><span class="description">For testing, 64-bit system override; if true, treat the system as 32-bit</span><pre>$force32Bit</pre></a></li>
<li class="property public "><a href="#property_forceNoBigNumber" title="$forceNoBigNumber :: For testing, Moontoast\Math\BigNumber override; if true, treat as if
BigNumber is not available"><span class="description">For testing, Moontoast\Math\BigNumber override; if true, treat as if
BigNumber is not available</span><pre>$forceNoBigNumber</pre></a></li>
<li class="property public "><a href="#property_ignoreSystemNode" title="$ignoreSystemNode :: For testing, system override to ignore generating node from hardware"><span class="description">For testing, system override to ignore generating node from hardware</span><pre>$ignoreSystemNode</pre></a></li>
<li class="property public "><a href="#property_timeOfDayTest" title="$timeOfDayTest :: For testing, sets time of day to a static, known value"><span class="description">For testing, sets time of day to a static, known value</span><pre>$timeOfDayTest</pre></a></li>
</ul>
</li>
<li class="nav-header protected">» Protected
<ul><li class="property protected "><a href="#property_fields" title="$fields :: The fields that make up this UUID"><span class="description">The fields that make up this UUID</span><pre>$fields</pre></a></li></ul>
</li>
<li class="nav-header">
<i class="icon-custom icon-constant"></i> Constants
<ul>
<li class="constant "><a href="#constant_NAMESPACE_DNS" title="NAMESPACE_DNS :: When this namespace is specified, the name string is a fully-qualified domain name."><span class="description">When this namespace is specified, the name string is a fully-qualified domain name.</span><pre>NAMESPACE_DNS</pre></a></li>
<li class="constant "><a href="#constant_NAMESPACE_OID" title="NAMESPACE_OID :: When this namespace is specified, the name string is an ISO OID."><span class="description">When this namespace is specified, the name string is an ISO OID.</span><pre>NAMESPACE_OID</pre></a></li>
<li class="constant "><a href="#constant_NAMESPACE_URL" title="NAMESPACE_URL :: When this namespace is specified, the name string is a URL."><span class="description">When this namespace is specified, the name string is a URL.</span><pre>NAMESPACE_URL</pre></a></li>
<li class="constant "><a href="#constant_NAMESPACE_X500" title="NAMESPACE_X500 :: When this namespace is specified, the name string is an X.500 DN in DER or a text output format."><span class="description">When this namespace is specified, the name string is an X.500 DN in DER or a text output format.</span><pre>NAMESPACE_X500</pre></a></li>
<li class="constant "><a href="#constant_NIL" title="NIL :: The nil UUID is special form of UUID that is specified to have all 128 bits set to zero."><span class="description">The nil UUID is special form of UUID that is specified to have all 128 bits set to zero.</span><pre>NIL</pre></a></li>
<li class="constant "><a href="#constant_RESERVED_FUTURE" title="RESERVED_FUTURE :: Reserved for future definition."><span class="description">Reserved for future definition.</span><pre>RESERVED_FUTURE</pre></a></li>
<li class="constant "><a href="#constant_RESERVED_MICROSOFT" title="RESERVED_MICROSOFT :: Reserved for Microsoft compatibility."><span class="description">Reserved for Microsoft compatibility.</span><pre>RESERVED_MICROSOFT</pre></a></li>
<li class="constant "><a href="#constant_RESERVED_NCS" title="RESERVED_NCS :: Reserved for NCS compatibility."><span class="description">Reserved for NCS compatibility.</span><pre>RESERVED_NCS</pre></a></li>
<li class="constant "><a href="#constant_RFC_4122" title="RFC_4122 :: Specifies the UUID layout given in RFC 4122."><span class="description">Specifies the UUID layout given in RFC 4122.</span><pre>RFC_4122</pre></a></li>
</ul>
</li>
</ul>
</div>
<div class="span8">
<a id="\Rhumsaa\Uuid\Uuid"></a><ul class="breadcrumb">
<li>
<a href="../index.html"><i class="icon-custom icon-class"></i></a><span class="divider">\</span>
</li>
<li><a href="../namespaces/Rhumsaa.html">Rhumsaa</a></li>
<li>
<span class="divider">\</span><a href="../namespaces/Rhumsaa.Uuid.html">Uuid</a>
</li>
<li class="active">
<span class="divider">\</span><a href="../classes/Rhumsaa.Uuid.Uuid.html">Uuid</a>
</li>
</ul>
<div class="element class">
<p class="short_description">Represents a universally unique identifier (UUID), according to RFC 4122</p>
<div class="details">
<div class="long_description"><p>This class provides immutable UUID objects (the Uuid class) and the static
methods <code>uuid1()</code>, <code>uuid3()</code>, <code>uuid4()</code>, and <code>uuid5()</code> for generating version
1, 3, 4, and 5 UUIDs as specified in RFC 4122.</p>
<p>If all you want is a unique ID, you should probably call <code>uuid1()</code> or <code>uuid4()</code>.
Note that <code>uuid1()</code> may compromise privacy since it creates a UUID containing
the computers network address. <code>uuid4()</code> creates a random UUID.</p></div>
<table class="table table-bordered">
<tr>
<th>link</th>
<td><a href="http://tools.ietf.org/html/rfc4122">http://tools.ietf.org/html/rfc4122</a></td>
</tr>
<tr>
<th>link</th>
<td><a href="http://en.wikipedia.org/wiki/Universally_unique_identifier">http://en.wikipedia.org/wiki/Universally_unique_identifier</a></td>
</tr>
<tr>
<th>link</th>
<td><a href="http://docs.python.org/3/library/uuid.html">http://docs.python.org/3/library/uuid.html</a></td>
</tr>
<tr>
<th>link</th>
<td><a href="http://docs.oracle.com/javase/6/docs/api/java/util/UUID.html">http://docs.oracle.com/javase/6/docs/api/java/util/UUID.html</a></td>
</tr>
</table>
<h3>
<i class="icon-custom icon-method"></i> Methods</h3>
<a id="method___toString"></a><div class="element clickable method public method___toString" data-toggle="collapse" data-target=".method___toString .collapse">
<h2>Converts this UUID object to a string when the object is used in any
string context</h2>
<pre>__toString() : string</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>link</th>
<td><a href="http://www.php.net/manual/en/language.oop5.magic.php#object.tostring">http://www.php.net/manual/en/language.oop5.magic.php#object.tostring</a></td>
</tr></table>
<h3>Returns</h3>
<div class="subelement response"><code>string</code></div>
</div></div>
</div>
<a id="method_compareTo"></a><div class="element clickable method public method_compareTo" data-toggle="collapse" data-target=".method_compareTo .collapse">
<h2>Compares this UUID with the specified UUID.</h2>
<pre>compareTo(\Rhumsaa\Uuid\Uuid $uuid) : int</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"><p>The first of two UUIDs is greater than the second if the most
significant field in which the UUIDs differ is greater for the first
UUID.</p></div>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$uuid</h4>
<code><a href="../classes/Rhumsaa.Uuid.Uuid.html">\Rhumsaa\Uuid\Uuid</a></code><p>UUID to which this UUID is to be compared</p></div>
<h3>Returns</h3>
<div class="subelement response">
<code>int</code>-1, 0 or 1 as this UUID is less than, equal to, or greater than $uuid</div>
</div></div>
</div>
<a id="method_equals"></a><div class="element clickable method public method_equals" data-toggle="collapse" data-target=".method_equals .collapse">
<h2>Compares this object to the specified object.</h2>
<pre>equals(object $obj) : bool</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"><p>The result is true if and only if the argument is not null, is a UUID
object, has the same variant, and contains the same value, bit for bit,
as this UUID.</p></div>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$obj</h4>
<code>object</code>
</div>
<h3>Returns</h3>
<div class="subelement response">
<code>bool</code>True if $obj is equal to this UUID</div>
</div></div>
</div>
<a id="method_fromBytes"></a><div class="element clickable method public method_fromBytes" data-toggle="collapse" data-target=".method_fromBytes .collapse">
<h2>Creates a UUID from a byte string.</h2>
<pre>fromBytes(string $bytes) : <a href="../classes/Rhumsaa.Uuid.Uuid.html">\Rhumsaa\Uuid\Uuid</a></pre>
<div class="labels"><span class="label">Static</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$bytes</h4>
<code>string</code>
</div>
<h3>Exceptions</h3>
<table class="table table-bordered"><tr>
<th><code><a href="http://php.net/manual/en/class.invalidargumentexception.php">\InvalidArgumentException</a></code></th>
<td>If the $bytes string does not contain 16 characters</td>
</tr></table>
<h3>Returns</h3>
<div class="subelement response"><code><a href="../classes/Rhumsaa.Uuid.Uuid.html">\Rhumsaa\Uuid\Uuid</a></code></div>
</div></div>
</div>
<a id="method_fromString"></a><div class="element clickable method public method_fromString" data-toggle="collapse" data-target=".method_fromString .collapse">
<h2>Creates a UUID from the string standard representation as described
in the toString() method.</h2>
<pre>fromString(string $name) : <a href="../classes/Rhumsaa.Uuid.Uuid.html">\Rhumsaa\Uuid\Uuid</a></pre>
<div class="labels"><span class="label">Static</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$name</h4>
<code>string</code><p>A string that specifies a UUID</p></div>
<h3>Exceptions</h3>
<table class="table table-bordered"><tr>
<th><code><a href="http://php.net/manual/en/class.invalidargumentexception.php">\InvalidArgumentException</a></code></th>
<td>If the $name isn't a valid UUID</td>
</tr></table>
<h3>Returns</h3>
<div class="subelement response"><code><a href="../classes/Rhumsaa.Uuid.Uuid.html">\Rhumsaa\Uuid\Uuid</a></code></div>
</div></div>
</div>
<a id="method_getBytes"></a><div class="element clickable method public method_getBytes" data-toggle="collapse" data-target=".method_getBytes .collapse">
<h2>Returns the UUID as a 16-byte string (containing the six integer fields
in big-endian byte order)</h2>
<pre>getBytes() : string</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<h3>Returns</h3>
<div class="subelement response"><code>string</code></div>
</div></div>
</div>
<a id="method_getClockSeqHiAndReserved"></a><div class="element clickable method public method_getClockSeqHiAndReserved" data-toggle="collapse" data-target=".method_getClockSeqHiAndReserved .collapse">
<h2>Returns the high field of the clock sequence multiplexed with the variant
(bits 65-72 of the UUID).</h2>
<pre>getClockSeqHiAndReserved() : int</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<h3>Returns</h3>
<div class="subelement response">
<code>int</code>Unsigned 8-bit integer value of clock_seq_hi_and_reserved</div>
</div></div>
</div>
<a id="method_getClockSeqHiAndReservedHex"></a><div class="element clickable method public method_getClockSeqHiAndReservedHex" data-toggle="collapse" data-target=".method_getClockSeqHiAndReservedHex .collapse">
<h2>Returns the high field of the clock sequence multiplexed with the variant
(bits 65-72 of the UUID).</h2>
<pre>getClockSeqHiAndReservedHex() : string</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<h3>Returns</h3>
<div class="subelement response">
<code>string</code>Hexadecimal value of clock_seq_hi_and_reserved</div>
</div></div>
</div>
<a id="method_getClockSeqLow"></a><div class="element clickable method public method_getClockSeqLow" data-toggle="collapse" data-target=".method_getClockSeqLow .collapse">
<h2>Returns the low field of the clock sequence (bits 73-80 of the UUID).</h2>
<pre>getClockSeqLow() : int</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<h3>Returns</h3>
<div class="subelement response">
<code>int</code>Unsigned 8-bit integer value of clock_seq_low</div>
</div></div>
</div>
<a id="method_getClockSeqLowHex"></a><div class="element clickable method public method_getClockSeqLowHex" data-toggle="collapse" data-target=".method_getClockSeqLowHex .collapse">
<h2>Returns the low field of the clock sequence (bits 73-80 of the UUID).</h2>
<pre>getClockSeqLowHex() : string</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<h3>Returns</h3>
<div class="subelement response">
<code>string</code>Hexadecimal value of clock_seq_low</div>
</div></div>
</div>
<a id="method_getClockSequence"></a><div class="element clickable method public method_getClockSequence" data-toggle="collapse" data-target=".method_getClockSequence .collapse">
<h2>Returns the clock sequence value associated with this UUID.</h2>
<pre>getClockSequence() : int</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"><p>For UUID version 1, the clock sequence is used to help avoid
duplicates that could arise when the clock is set backwards in time
or if the node ID changes.</p>
<p>For UUID version 3 or 5, the clock sequence is a 14-bit value
constructed from a name as described in RFC 4122, Section 4.3.</p>
<p>For UUID version 4, clock sequence is a randomly or pseudo-randomly
generated 14-bit value as described in RFC 4122, Section 4.4.</p></div>
<table class="table table-bordered"><tr>
<th>link</th>
<td><a href="http://tools.ietf.org/html/rfc4122#section-4.1.5">http://tools.ietf.org/html/rfc4122#section-4.1.5</a></td>
</tr></table>
<h3>Returns</h3>
<div class="subelement response">
<code>int</code>Unsigned 14-bit integer value of clock sequence</div>
</div></div>
</div>
<a id="method_getClockSequenceHex"></a><div class="element clickable method public method_getClockSequenceHex" data-toggle="collapse" data-target=".method_getClockSequenceHex .collapse">
<h2>Returns the clock sequence value associated with this UUID.</h2>
<pre>getClockSequenceHex() : string</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<h3>Returns</h3>
<div class="subelement response">
<code>string</code>Hexadecimal value of clock sequence</div>
</div></div>
</div>
<a id="method_getDateTime"></a><div class="element clickable method public method_getDateTime" data-toggle="collapse" data-target=".method_getDateTime .collapse">
<h2>Returns a PHP DateTime object representing the timestamp associated
with this UUID.</h2>
<pre>getDateTime() : <a href="http://php.net/manual/en/class.datetime.php">\DateTime</a></pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"><p>The timestamp value is only meaningful in a time-based UUID, which
has version type 1. If this UUID is not a time-based UUID then
this method throws UnsupportedOperationException.</p></div>
<h3>Exceptions</h3>
<table class="table table-bordered">
<tr>
<th><code><a href="../classes/Rhumsaa.Uuid.Exception.UnsupportedOperationException.html">\Rhumsaa\Uuid\Exception\UnsupportedOperationException</a></code></th>
<td>If this UUID is not a version 1 UUID</td>
</tr>
<tr>
<th><code><a href="../classes/Rhumsaa.Uuid.Exception.UnsatisfiedDependencyException.html">\Rhumsaa\Uuid\Exception\UnsatisfiedDependencyException</a></code></th>
<td>if called on a 32-bit system and Moontoast\Math\BigNumber is not present</td>
</tr>
</table>
<h3>Returns</h3>
<div class="subelement response">
<code><a href="http://php.net/manual/en/class.datetime.php">\DateTime</a></code>A PHP DateTime representation of the date</div>
</div></div>
</div>
<a id="method_getFields"></a><div class="element clickable method public method_getFields" data-toggle="collapse" data-target=".method_getFields .collapse">
<h2>Returns an array of the fields of this UUID, with keys named according
to the RFC 4122 names for the fields.</h2>
<pre>getFields() : array</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"><ul>
<li><strong>time_low</strong>: The low field of the timestamp, an unsigned 32-bit integer</li>
<li><strong>time_mid</strong>: The middle field of the timestamp, an unsigned 16-bit integer</li>
<li><strong>time_hi_and_version</strong>: The high field of the timestamp multiplexed with
the version number, an unsigned 16-bit integer</li>
<li><strong>clock_seq_hi_and_reserved</strong>: The high field of the clock sequence
multiplexed with the variant, an unsigned 8-bit integer</li>
<li><strong>clock_seq_low</strong>: The low field of the clock sequence, an unsigned
8-bit integer</li>
<li><strong>node</strong>: The spatially unique node identifier, an unsigned 48-bit
integer</li>
</ul></div>
<table class="table table-bordered"><tr>
<th>link</th>
<td><a href="http://tools.ietf.org/html/rfc4122#section-4.1.2">http://tools.ietf.org/html/rfc4122#section-4.1.2</a></td>
</tr></table>
<h3>Exceptions</h3>
<table class="table table-bordered"><tr>
<th><code><a href="../classes/Rhumsaa.Uuid.Exception.UnsatisfiedDependencyException.html">\Rhumsaa\Uuid\Exception\UnsatisfiedDependencyException</a></code></th>
<td>if called on a 32-bit system</td>
</tr></table>
<h3>Returns</h3>
<div class="subelement response">
<code>array</code>The UUID fields represented as integer values</div>
</div></div>
</div>
<a id="method_getFieldsHex"></a><div class="element clickable method public method_getFieldsHex" data-toggle="collapse" data-target=".method_getFieldsHex .collapse">
<h2>Returns an array of the fields of this UUID, with keys named according
to the RFC 4122 names for the fields.</h2>
<pre>getFieldsHex() : array</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"><ul>
<li><strong>time_low</strong>: The low field of the timestamp, an unsigned 32-bit integer</li>
<li><strong>time_mid</strong>: The middle field of the timestamp, an unsigned 16-bit integer</li>
<li><strong>time_hi_and_version</strong>: The high field of the timestamp multiplexed with
the version number, an unsigned 16-bit integer</li>
<li><strong>clock_seq_hi_and_reserved</strong>: The high field of the clock sequence
multiplexed with the variant, an unsigned 8-bit integer</li>
<li><strong>clock_seq_low</strong>: The low field of the clock sequence, an unsigned
8-bit integer</li>
<li><strong>node</strong>: The spatially unique node identifier, an unsigned 48-bit
integer</li>
</ul></div>
<h3>Returns</h3>
<div class="subelement response">
<code>array</code>The UUID fields represented as hexadecimal values</div>
</div></div>
</div>
<a id="method_getLeastSignificantBits"></a><div class="element clickable method public method_getLeastSignificantBits" data-toggle="collapse" data-target=".method_getLeastSignificantBits .collapse">
<h2>Returns the least significant 64 bits of this UUID's 128 bit value</h2>
<pre>getLeastSignificantBits() : \Moontoast\Math\BigNumber</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<h3>Exceptions</h3>
<table class="table table-bordered"><tr>
<th><code><a href="../classes/Rhumsaa.Uuid.Exception.UnsatisfiedDependencyException.html">\Rhumsaa\Uuid\Exception\UnsatisfiedDependencyException</a></code></th>
<td>if Moontoast\Math\BigNumber is not present</td>
</tr></table>
<h3>Returns</h3>
<div class="subelement response">
<code>\Moontoast\Math\BigNumber</code>BigNumber representation of the unsigned 64-bit integer value</div>
</div></div>
</div>
<a id="method_getLeastSignificantBitsHex"></a><div class="element clickable method public method_getLeastSignificantBitsHex" data-toggle="collapse" data-target=".method_getLeastSignificantBitsHex .collapse">
<h2>Returns the least significant 64 bits of this UUID's 128 bit value</h2>
<pre>getLeastSignificantBitsHex() : string</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<h3>Returns</h3>
<div class="subelement response">
<code>string</code>Hexadecimal value of least significant bits</div>
</div></div>
</div>
<a id="method_getMostSignificantBits"></a><div class="element clickable method public method_getMostSignificantBits" data-toggle="collapse" data-target=".method_getMostSignificantBits .collapse">
<h2>Returns the most significant 64 bits of this UUID's 128 bit value</h2>
<pre>getMostSignificantBits() : \Moontoast\Math\BigNumber</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<h3>Exceptions</h3>
<table class="table table-bordered"><tr>
<th><code><a href="../classes/Rhumsaa.Uuid.Exception.UnsatisfiedDependencyException.html">\Rhumsaa\Uuid\Exception\UnsatisfiedDependencyException</a></code></th>
<td>if Moontoast\Math\BigNumber is not present</td>
</tr></table>
<h3>Returns</h3>
<div class="subelement response">
<code>\Moontoast\Math\BigNumber</code>BigNumber representation of the unsigned 64-bit integer value</div>
</div></div>
</div>
<a id="method_getMostSignificantBitsHex"></a><div class="element clickable method public method_getMostSignificantBitsHex" data-toggle="collapse" data-target=".method_getMostSignificantBitsHex .collapse">
<h2>Returns the most significant 64 bits of this UUID's 128 bit value</h2>
<pre>getMostSignificantBitsHex() : string</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<h3>Returns</h3>
<div class="subelement response">
<code>string</code>Hexadecimal value of most significant bits</div>
</div></div>
</div>
<a id="method_getNode"></a><div class="element clickable method public method_getNode" data-toggle="collapse" data-target=".method_getNode .collapse">
<h2>Returns the node value associated with this UUID</h2>
<pre>getNode() : int</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"><p>For UUID version 1, the node field consists of an IEEE 802 MAC
address, usually the host address. For systems with multiple IEEE
802 addresses, any available one can be used. The lowest addressed
octet (octet number 10) contains the global/local bit and the
unicast/multicast bit, and is the first octet of the address
transmitted on an 802.3 LAN.</p>
<p>For systems with no IEEE address, a randomly or pseudo-randomly
generated value may be used; see RFC 4122, Section 4.5. The
multicast bit must be set in such addresses, in order that they
will never conflict with addresses obtained from network cards.</p>
<p>For UUID version 3 or 5, the node field is a 48-bit value constructed
from a name as described in RFC 4122, Section 4.3.</p>
<p>For UUID version 4, the node field is a randomly or pseudo-randomly
generated 48-bit value as described in RFC 4122, Section 4.4.</p></div>
<table class="table table-bordered"><tr>
<th>link</th>
<td><a href="http://tools.ietf.org/html/rfc4122#section-4.1.6">http://tools.ietf.org/html/rfc4122#section-4.1.6</a></td>
</tr></table>
<h3>Exceptions</h3>
<table class="table table-bordered"><tr>
<th><code><a href="../classes/Rhumsaa.Uuid.Exception.UnsatisfiedDependencyException.html">\Rhumsaa\Uuid\Exception\UnsatisfiedDependencyException</a></code></th>
<td>if called on a 32-bit system</td>
</tr></table>
<h3>Returns</h3>
<div class="subelement response">
<code>int</code>Unsigned 48-bit integer value of node</div>
</div></div>
</div>
<a id="method_getNodeHex"></a><div class="element clickable method public method_getNodeHex" data-toggle="collapse" data-target=".method_getNodeHex .collapse">
<h2>Returns the node value associated with this UUID</h2>
<pre>getNodeHex() : string</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"><p>For UUID version 1, the node field consists of an IEEE 802 MAC
address, usually the host address. For systems with multiple IEEE
802 addresses, any available one can be used. The lowest addressed
octet (octet number 10) contains the global/local bit and the
unicast/multicast bit, and is the first octet of the address
transmitted on an 802.3 LAN.</p>
<p>For systems with no IEEE address, a randomly or pseudo-randomly
generated value may be used; see RFC 4122, Section 4.5. The
multicast bit must be set in such addresses, in order that they
will never conflict with addresses obtained from network cards.</p>
<p>For UUID version 3 or 5, the node field is a 48-bit value constructed
from a name as described in RFC 4122, Section 4.3.</p>
<p>For UUID version 4, the node field is a randomly or pseudo-randomly
generated 48-bit value as described in RFC 4122, Section 4.4.</p></div>
<table class="table table-bordered"><tr>
<th>link</th>
<td><a href="http://tools.ietf.org/html/rfc4122#section-4.1.6">http://tools.ietf.org/html/rfc4122#section-4.1.6</a></td>
</tr></table>
<h3>Returns</h3>
<div class="subelement response">
<code>string</code>Hexadecimal value of node</div>
</div></div>
</div>
<a id="method_getTimeHiAndVersion"></a><div class="element clickable method public method_getTimeHiAndVersion" data-toggle="collapse" data-target=".method_getTimeHiAndVersion .collapse">
<h2>Returns the high field of the timestamp multiplexed with the version
number (bits 49-64 of the UUID).</h2>
<pre>getTimeHiAndVersion() : int</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<h3>Returns</h3>
<div class="subelement response">
<code>int</code>Unsigned 16-bit integer value of time_hi_and_version</div>
</div></div>
</div>
<a id="method_getTimeHiAndVersionHex"></a><div class="element clickable method public method_getTimeHiAndVersionHex" data-toggle="collapse" data-target=".method_getTimeHiAndVersionHex .collapse">
<h2>Returns the high field of the timestamp multiplexed with the version
number (bits 49-64 of the UUID).</h2>
<pre>getTimeHiAndVersionHex() : string</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<h3>Returns</h3>
<div class="subelement response">
<code>string</code>Hexadecimal value of time_hi_and_version</div>
</div></div>
</div>
<a id="method_getTimeLow"></a><div class="element clickable method public method_getTimeLow" data-toggle="collapse" data-target=".method_getTimeLow .collapse">
<h2>Returns the low field of the timestamp (the first 32 bits of the UUID).</h2>
<pre>getTimeLow() : int</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<h3>Exceptions</h3>
<table class="table table-bordered"><tr>
<th><code><a href="../classes/Rhumsaa.Uuid.Exception.UnsatisfiedDependencyException.html">\Rhumsaa\Uuid\Exception\UnsatisfiedDependencyException</a></code></th>
<td>if called on a 32-bit system</td>
</tr></table>
<h3>Returns</h3>
<div class="subelement response">
<code>int</code>Unsigned 32-bit integer value of time_low</div>
</div></div>
</div>
<a id="method_getTimeLowHex"></a><div class="element clickable method public method_getTimeLowHex" data-toggle="collapse" data-target=".method_getTimeLowHex .collapse">
<h2>Returns the low field of the timestamp (the first 32 bits of the UUID).</h2>
<pre>getTimeLowHex() : string</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<h3>Returns</h3>
<div class="subelement response">
<code>string</code>Hexadecimal value of time_low</div>
</div></div>
</div>
<a id="method_getTimeMid"></a><div class="element clickable method public method_getTimeMid" data-toggle="collapse" data-target=".method_getTimeMid .collapse">
<h2>Returns the middle field of the timestamp (bits 33-48 of the UUID).</h2>
<pre>getTimeMid() : int</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<h3>Returns</h3>
<div class="subelement response">
<code>int</code>Unsigned 16-bit integer value of time_mid</div>
</div></div>
</div>
<a id="method_getTimeMidHex"></a><div class="element clickable method public method_getTimeMidHex" data-toggle="collapse" data-target=".method_getTimeMidHex .collapse">
<h2>Returns the middle field of the timestamp (bits 33-48 of the UUID).</h2>
<pre>getTimeMidHex() : string</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<h3>Returns</h3>
<div class="subelement response">
<code>string</code>Hexadecimal value of time_mid</div>
</div></div>
</div>
<a id="method_getTimestamp"></a><div class="element clickable method public method_getTimestamp" data-toggle="collapse" data-target=".method_getTimestamp .collapse">
<h2>The timestamp value associated with this UUID</h2>
<pre>getTimestamp() : int</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"><p>The 60 bit timestamp value is constructed from the time_low,
time_mid, and time_hi fields of this UUID. The resulting
timestamp is measured in 100-nanosecond units since midnight,
October 15, 1582 UTC.</p>
<p>The timestamp value is only meaningful in a time-based UUID, which
has version type 1. If this UUID is not a time-based UUID then
this method throws UnsupportedOperationException.</p></div>
<table class="table table-bordered"><tr>
<th>link</th>
<td><a href="http://tools.ietf.org/html/rfc4122#section-4.1.4">http://tools.ietf.org/html/rfc4122#section-4.1.4</a></td>
</tr></table>
<h3>Exceptions</h3>
<table class="table table-bordered">
<tr>
<th><code><a href="../classes/Rhumsaa.Uuid.Exception.UnsupportedOperationException.html">\Rhumsaa\Uuid\Exception\UnsupportedOperationException</a></code></th>
<td>If this UUID is not a version 1 UUID</td>
</tr>
<tr>
<th><code><a href="../classes/Rhumsaa.Uuid.Exception.UnsatisfiedDependencyException.html">\Rhumsaa\Uuid\Exception\UnsatisfiedDependencyException</a></code></th>
<td>if called on a 32-bit system</td>
</tr>
</table>
<h3>Returns</h3>
<div class="subelement response">
<code>int</code>Unsigned 60-bit integer value of the timestamp</div>
</div></div>
</div>
<a id="method_getTimestampHex"></a><div class="element clickable method public method_getTimestampHex" data-toggle="collapse" data-target=".method_getTimestampHex .collapse">
<h2>The timestamp value associated with this UUID</h2>
<pre>getTimestampHex() : string</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"><p>The 60 bit timestamp value is constructed from the time_low,
time_mid, and time_hi fields of this UUID. The resulting
timestamp is measured in 100-nanosecond units since midnight,
October 15, 1582 UTC.</p>
<p>The timestamp value is only meaningful in a time-based UUID, which
has version type 1. If this UUID is not a time-based UUID then
this method throws UnsupportedOperationException.</p></div>
<table class="table table-bordered"><tr>
<th>link</th>
<td><a href="http://tools.ietf.org/html/rfc4122#section-4.1.4">http://tools.ietf.org/html/rfc4122#section-4.1.4</a></td>
</tr></table>
<h3>Exceptions</h3>
<table class="table table-bordered"><tr>
<th><code><a href="../classes/Rhumsaa.Uuid.Exception.UnsupportedOperationException.html">\Rhumsaa\Uuid\Exception\UnsupportedOperationException</a></code></th>
<td>If this UUID is not a version 1 UUID</td>
</tr></table>
<h3>Returns</h3>
<div class="subelement response">
<code>string</code>Hexadecimal value of the timestamp</div>
</div></div>
</div>
<a id="method_getUrn"></a><div class="element clickable method public method_getUrn" data-toggle="collapse" data-target=".method_getUrn .collapse">
<h2>Returns the string representation of the UUID as a URN.</h2>
<pre>getUrn() : string</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>link</th>
<td><a href="http://en.wikipedia.org/wiki/Uniform_Resource_Name">http://en.wikipedia.org/wiki/Uniform_Resource_Name</a></td>
</tr></table>
<h3>Returns</h3>
<div class="subelement response"><code>string</code></div>
</div></div>
</div>
<a id="method_getVariant"></a><div class="element clickable method public method_getVariant" data-toggle="collapse" data-target=".method_getVariant .collapse">
<h2>Returns the variant number associated with this UUID.</h2>
<pre>getVariant() : int</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"><p>The variant number describes the layout of the UUID. The variant
number has the following meaning:</p>
<ul>
<li>0 - Reserved for NCS backward compatibility</li>
<li>2 - The RFC 4122 variant (used by this class)</li>
<li>6 - Reserved, Microsoft Corporation backward compatibility</li>
<li>7 - Reserved for future definition</li>
</ul></div>
<table class="table table-bordered"><tr>
<th>link</th>
<td><a href="http://tools.ietf.org/html/rfc4122#section-4.1.1">http://tools.ietf.org/html/rfc4122#section-4.1.1</a></td>
</tr></table>
<h3>Returns</h3>
<div class="subelement response"><code>int</code></div>
</div></div>
</div>
<a id="method_getVersion"></a><div class="element clickable method public method_getVersion" data-toggle="collapse" data-target=".method_getVersion .collapse">
<h2>The version number associated with this UUID.</h2>
<pre>getVersion() : int</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"><p>The version
number describes how this UUID was generated.</p>
<p>The version number has the following meaning:</p>
<ul>
<li>1 - Time-based UUID</li>
<li>2 - DCE security UUID</li>
<li>3 - Name-based UUID hashed with MD5</li>
<li>4 - Randomly generated UUID</li>
<li>5 - Name-based UUID hashed with SHA-1</li>
</ul></div>
<table class="table table-bordered"><tr>
<th>link</th>
<td><a href="http://tools.ietf.org/html/rfc4122#section-4.1.3">http://tools.ietf.org/html/rfc4122#section-4.1.3</a></td>
</tr></table>
<h3>Returns</h3>
<div class="subelement response"><code>int</code></div>
</div></div>
</div>
<a id="method_isValid"></a><div class="element clickable method public method_isValid" data-toggle="collapse" data-target=".method_isValid .collapse">
<h2>Check if a string is a valid uuid</h2>
<pre>isValid(string $uuid) : boolean</pre>
<div class="labels"><span class="label">Static</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$uuid</h4>
<code>string</code><p>The uuid to test</p></div>
<h3>Returns</h3>
<div class="subelement response"><code>boolean</code></div>
</div></div>
</div>
<a id="method_toString"></a><div class="element clickable method public method_toString" data-toggle="collapse" data-target=".method_toString .collapse">
<h2>Converts this UUID into a string representation</h2>
<pre>toString() : string</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<h3>Returns</h3>
<div class="subelement response"><code>string</code></div>
</div></div>
</div>
<a id="method_uuid1"></a><div class="element clickable method public method_uuid1" data-toggle="collapse" data-target=".method_uuid1 .collapse">
<h2>Generate a version 1 UUID from a host ID, sequence number, and the current time.</h2>
<pre>uuid1(int | string $node, int $clockSeq) : <a href="../classes/Rhumsaa.Uuid.Uuid.html">\Rhumsaa\Uuid\Uuid</a></pre>
<div class="labels"><span class="label">Static</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"><p>If $node is not given, getMacAddress() is used to obtain the hardware
address. If $clockSeq is given, it is used as the sequence number;
otherwise a random 14-bit sequence number is chosen.</p></div>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$node</h4>
<code>int</code><code>string</code><p>A 48-bit number representing the hardware address. This number may be represented as an integer or a hexadecimal string.</p>
</div>
<div class="subelement argument">
<h4>$clockSeq</h4>
<code>int</code><p>A 14-bit number used to help avoid duplicates that could arise when the clock is set backwards in time or if the node ID changes.</p>
</div>
<h3>Exceptions</h3>
<table class="table table-bordered"><tr>
<th><code><a href="http://php.net/manual/en/class.invalidargumentexception.php">\InvalidArgumentException</a></code></th>
<td>if the $node is invalid</td>
</tr></table>
<h3>Returns</h3>
<div class="subelement response"><code><a href="../classes/Rhumsaa.Uuid.Uuid.html">\Rhumsaa\Uuid\Uuid</a></code></div>
</div></div>
</div>
<a id="method_uuid3"></a><div class="element clickable method public method_uuid3" data-toggle="collapse" data-target=".method_uuid3 .collapse">
<h2>Generate a version 3 UUID based on the MD5 hash of a namespace identifier (which
is a UUID) and a name (which is a string).</h2>
<pre>uuid3(<a href="../classes/Rhumsaa.Uuid.Uuid.html">\Rhumsaa\Uuid\Uuid</a> | string $ns, string $name) : <a href="../classes/Rhumsaa.Uuid.Uuid.html">\Rhumsaa\Uuid\Uuid</a></pre>
<div class="labels"><span class="label">Static</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$ns</h4>
<code><a href="../classes/Rhumsaa.Uuid.Uuid.html">\Rhumsaa\Uuid\Uuid</a></code><code>string</code><p>The UUID namespace in which to create the named UUID</p></div>
<div class="subelement argument">
<h4>$name</h4>
<code>string</code><p>The name to create a UUID for</p></div>
<h3>Returns</h3>
<div class="subelement response"><code><a href="../classes/Rhumsaa.Uuid.Uuid.html">\Rhumsaa\Uuid\Uuid</a></code></div>
</div></div>
</div>
<a id="method_uuid4"></a><div class="element clickable method public method_uuid4" data-toggle="collapse" data-target=".method_uuid4 .collapse">
<h2>Generate a version 4 (random) UUID.</h2>
<pre>uuid4() : <a href="../classes/Rhumsaa.Uuid.Uuid.html">\Rhumsaa\Uuid\Uuid</a></pre>
<div class="labels"><span class="label">Static</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<h3>Returns</h3>
<div class="subelement response"><code><a href="../classes/Rhumsaa.Uuid.Uuid.html">\Rhumsaa\Uuid\Uuid</a></code></div>
</div></div>
</div>
<a id="method_uuid5"></a><div class="element clickable method public method_uuid5" data-toggle="collapse" data-target=".method_uuid5 .collapse">
<h2>Generate a version 5 UUID based on the SHA-1 hash of a namespace identifier (which
is a UUID) and a name (which is a string).</h2>
<pre>uuid5(<a href="../classes/Rhumsaa.Uuid.Uuid.html">\Rhumsaa\Uuid\Uuid</a> | string $ns, string $name) : <a href="../classes/Rhumsaa.Uuid.Uuid.html">\Rhumsaa\Uuid\Uuid</a></pre>
<div class="labels"><span class="label">Static</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$ns</h4>
<code><a href="../classes/Rhumsaa.Uuid.Uuid.html">\Rhumsaa\Uuid\Uuid</a></code><code>string</code><p>The UUID namespace in which to create the named UUID</p></div>
<div class="subelement argument">
<h4>$name</h4>
<code>string</code><p>The name to create a UUID for</p></div>
<h3>Returns</h3>
<div class="subelement response"><code><a href="../classes/Rhumsaa.Uuid.Uuid.html">\Rhumsaa\Uuid\Uuid</a></code></div>
</div></div>
</div>
<a id="method___construct"></a><div class="element clickable method protected method___construct" data-toggle="collapse" data-target=".method___construct .collapse">
<h2>Creates a universally unique identifier (UUID) from the most significant
bits and least significant bits.</h2>
<pre>__construct(array $fields) </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"><p>Protected to prevent direct instantiation. Use static methods to create
UUIDs.</p></div>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$fields</h4>
<code>array</code>
</div>
</div></div>
</div>
<a id="method_calculateUuidTime"></a><div class="element clickable method protected method_calculateUuidTime" data-toggle="collapse" data-target=".method_calculateUuidTime .collapse">
<h2>Calculates the UUID time fields from a UNIX timestamp</h2>
<pre>calculateUuidTime(int $sec, int $usec) : array</pre>
<div class="labels"><span class="label">Static</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"><p>UUID time is a 60-bit time value as a count of 100-nanosecond intervals
since 00:00:00.00, 15 October 1582.</p></div>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$sec</h4>
<code>int</code><p>Seconds since the Unix Epoch</p></div>
<div class="subelement argument">
<h4>$usec</h4>
<code>int</code><p>Microseconds</p></div>
<h3>Exceptions</h3>
<table class="table table-bordered"><tr>
<th><code><a href="../classes/Rhumsaa.Uuid.Exception.UnsatisfiedDependencyException.html">\Rhumsaa\Uuid\Exception\UnsatisfiedDependencyException</a></code></th>
<td>if called on a 32-bit system and Moontoast\Math\BigNumber is not present</td>
</tr></table>
<h3>Returns</h3>
<div class="subelement response"><code>array</code></div>
</div></div>
</div>
<a id="method_getNodeFromSystem"></a><div class="element clickable method protected method_getNodeFromSystem" data-toggle="collapse" data-target=".method_getNodeFromSystem .collapse">
<h2>Get the hardware address as a 48-bit positive integer.</h2>
<pre>getNodeFromSystem() : string</pre>
<div class="labels"><span class="label">Static</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"><p>If all attempts to
obtain the hardware address fail, we choose a random 48-bit number with
its eighth bit set to 1 as recommended in RFC 4122. "Hardware address"
means the MAC address of a network interface, and on a machine with
multiple network interfaces the MAC address of any one of them may be
returned.</p></div>
<table class="table table-bordered"><tr>
<th>todo</th>
<td>Needs evaluation and possibly modification to ensure this works
well across multiple platforms.</td>
</tr></table>
<h3>Returns</h3>
<div class="subelement response"><code>string</code></div>
</div></div>
</div>
<a id="method_hasBigNumber"></a><div class="element clickable method protected method_hasBigNumber" data-toggle="collapse" data-target=".method_hasBigNumber .collapse">
<h2>Returns true if the system has Moontoast\Math\BigNumber</h2>
<pre>hasBigNumber() : bool</pre>
<div class="labels"><span class="label">Static</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<h3>Returns</h3>
<div class="subelement response"><code>bool</code></div>
</div></div>
</div>
<a id="method_is64BitSystem"></a><div class="element clickable method protected method_is64BitSystem" data-toggle="collapse" data-target=".method_is64BitSystem .collapse">
<h2>Returns true if the system is 64-bit, false otherwise</h2>
<pre>is64BitSystem() : bool</pre>
<div class="labels"><span class="label">Static</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<h3>Returns</h3>
<div class="subelement response"><code>bool</code></div>
</div></div>
</div>
<a id="method_uuidFromHashedName"></a><div class="element clickable method protected method_uuidFromHashedName" data-toggle="collapse" data-target=".method_uuidFromHashedName .collapse">
<h2>Returns a version 3 or 5 UUID based on the hash (md5 or sha1) of a
namespace identifier (which is a UUID) and a name (which is a string)</h2>
<pre>uuidFromHashedName(string $hash, int $version) : <a href="../classes/Rhumsaa.Uuid.Uuid.html">\Rhumsaa\Uuid\Uuid</a></pre>
<div class="labels"><span class="label">Static</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$hash</h4>
<code>string</code><p>The hash to use when creating the UUID</p></div>
<div class="subelement argument">
<h4>$version</h4>
<code>int</code><p>The UUID version to be generated</p></div>
<h3>Returns</h3>
<div class="subelement response"><code><a href="../classes/Rhumsaa.Uuid.Uuid.html">\Rhumsaa\Uuid\Uuid</a></code></div>
</div></div>
</div>
<h3>
<i class="icon-custom icon-property"></i> Properties</h3>
<a id="property_force32Bit"> </a><div class="element clickable property public property_force32Bit" data-toggle="collapse" data-target=".property_force32Bit .collapse">
<h2>For testing, 64-bit system override; if true, treat the system as 32-bit</h2>
<pre>$force32Bit : bool</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description"><div class="long_description"></div></div></div>
</div>
<a id="property_forceNoBigNumber"> </a><div class="element clickable property public property_forceNoBigNumber" data-toggle="collapse" data-target=".property_forceNoBigNumber .collapse">
<h2>For testing, Moontoast\Math\BigNumber override; if true, treat as if
BigNumber is not available</h2>
<pre>$forceNoBigNumber : bool</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description"><div class="long_description"></div></div></div>
</div>
<a id="property_ignoreSystemNode"> </a><div class="element clickable property public property_ignoreSystemNode" data-toggle="collapse" data-target=".property_ignoreSystemNode .collapse">
<h2>For testing, system override to ignore generating node from hardware</h2>
<pre>$ignoreSystemNode : bool</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description"><div class="long_description"></div></div></div>
</div>
<a id="property_timeOfDayTest"> </a><div class="element clickable property public property_timeOfDayTest" data-toggle="collapse" data-target=".property_timeOfDayTest .collapse">
<h2>For testing, sets time of day to a static, known value</h2>
<pre>$timeOfDayTest : array</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description"><div class="long_description"></div></div></div>
</div>
<a id="property_fields"> </a><div class="element clickable property protected property_fields" data-toggle="collapse" data-target=".property_fields .collapse">
<h2>The fields that make up this UUID</h2>
<pre>$fields : array</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"><p>This is initialized to the nil value.</p></div>
<table class="table table-bordered"><tr>
<th>see</th>
<td><a href="Uuid.html#%5CRhumsaa%5CUuid%5CUuid::getFields">\Rhumsaa\Uuid\Uuid::getFields</a></td>
</tr></table>
</div></div>
</div>
<h3>
<i class="icon-custom icon-constant"></i> Constants</h3>
<a id="constant_NAMESPACE_DNS"> </a><div class="element clickable constant constant_NAMESPACE_DNS" data-toggle="collapse" data-target=".constant_NAMESPACE_DNS .collapse">
<h2>When this namespace is specified, the name string is a fully-qualified domain name.</h2>
<pre>NAMESPACE_DNS </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>link</th>
<td><a href="http://tools.ietf.org/html/rfc4122#appendix-C">http://tools.ietf.org/html/rfc4122#appendix-C</a></td>
</tr></table>
</div></div>
</div>
<a id="constant_NAMESPACE_OID"> </a><div class="element clickable constant constant_NAMESPACE_OID" data-toggle="collapse" data-target=".constant_NAMESPACE_OID .collapse">
<h2>When this namespace is specified, the name string is an ISO OID.</h2>
<pre>NAMESPACE_OID </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>link</th>
<td><a href="http://tools.ietf.org/html/rfc4122#appendix-C">http://tools.ietf.org/html/rfc4122#appendix-C</a></td>
</tr></table>
</div></div>
</div>
<a id="constant_NAMESPACE_URL"> </a><div class="element clickable constant constant_NAMESPACE_URL" data-toggle="collapse" data-target=".constant_NAMESPACE_URL .collapse">
<h2>When this namespace is specified, the name string is a URL.</h2>
<pre>NAMESPACE_URL </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>link</th>
<td><a href="http://tools.ietf.org/html/rfc4122#appendix-C">http://tools.ietf.org/html/rfc4122#appendix-C</a></td>
</tr></table>
</div></div>
</div>
<a id="constant_NAMESPACE_X500"> </a><div class="element clickable constant constant_NAMESPACE_X500" data-toggle="collapse" data-target=".constant_NAMESPACE_X500 .collapse">
<h2>When this namespace is specified, the name string is an X.500 DN in DER or a text output format.</h2>
<pre>NAMESPACE_X500 </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>link</th>
<td><a href="http://tools.ietf.org/html/rfc4122#appendix-C">http://tools.ietf.org/html/rfc4122#appendix-C</a></td>
</tr></table>
</div></div>
</div>
<a id="constant_NIL"> </a><div class="element clickable constant constant_NIL" data-toggle="collapse" data-target=".constant_NIL .collapse">
<h2>The nil UUID is special form of UUID that is specified to have all 128 bits set to zero.</h2>
<pre>NIL </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>link</th>
<td><a href="http://tools.ietf.org/html/rfc4122#section-4.1.7">http://tools.ietf.org/html/rfc4122#section-4.1.7</a></td>
</tr></table>
</div></div>
</div>
<a id="constant_RESERVED_FUTURE"> </a><div class="element clickable constant constant_RESERVED_FUTURE" data-toggle="collapse" data-target=".constant_RESERVED_FUTURE .collapse">
<h2>Reserved for future definition.</h2>
<pre>RESERVED_FUTURE </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>link</th>
<td><a href="http://tools.ietf.org/html/rfc4122#section-4.1.1">http://tools.ietf.org/html/rfc4122#section-4.1.1</a></td>
</tr></table>
</div></div>
</div>
<a id="constant_RESERVED_MICROSOFT"> </a><div class="element clickable constant constant_RESERVED_MICROSOFT" data-toggle="collapse" data-target=".constant_RESERVED_MICROSOFT .collapse">
<h2>Reserved for Microsoft compatibility.</h2>
<pre>RESERVED_MICROSOFT </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>link</th>
<td><a href="http://tools.ietf.org/html/rfc4122#section-4.1.1">http://tools.ietf.org/html/rfc4122#section-4.1.1</a></td>
</tr></table>
</div></div>
</div>
<a id="constant_RESERVED_NCS"> </a><div class="element clickable constant constant_RESERVED_NCS" data-toggle="collapse" data-target=".constant_RESERVED_NCS .collapse">
<h2>Reserved for NCS compatibility.</h2>
<pre>RESERVED_NCS </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>link</th>
<td><a href="http://tools.ietf.org/html/rfc4122#section-4.1.1">http://tools.ietf.org/html/rfc4122#section-4.1.1</a></td>
</tr></table>
</div></div>
</div>
<a id="constant_RFC_4122"> </a><div class="element clickable constant constant_RFC_4122" data-toggle="collapse" data-target=".constant_RFC_4122 .collapse">
<h2>Specifies the UUID layout given in RFC 4122.</h2>
<pre>RFC_4122 </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>link</th>
<td><a href="http://tools.ietf.org/html/rfc4122#section-4.1.1">http://tools.ietf.org/html/rfc4122#section-4.1.1</a></td>
</tr></table>
</div></div>
</div>
</div>
</div>
</div>
</div>
<div class="row"><footer class="span12">
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a10</a> and<br>
generated on 2013-07-16T10:06:28-05:00.<br></footer></div>
</div>
</body>
</html>