Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117878577
Utils.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
604 B
Referenced Files
None
Subscribers
None
Utils.php
View Options
<?php
namespace
App
;
use
Ramsey\Uuid\Uuid
;
/**
* Small utility functions for App.
*/
class
Utils
{
/**
* Returns a UUID in the form of an integer.
*
* @return integer
*/
public
static
function
uuidInt
()
{
$hex
=
Uuid
::
uuid4
();
$bin
=
pack
(
'h*'
,
str_replace
(
'-'
,
''
,
$hex
));
$ids
=
unpack
(
'L'
,
$bin
);
$id
=
array_shift
(
$ids
);
return
$id
;
}
/**
* Returns a UUID in the form of a string.
*
* @return string
*/
public
static
function
uuidStr
()
{
return
(
string
)
Uuid
::
uuid4
();
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Apr 5, 10:19 PM (2 w, 5 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
8b/4a/fed41cffbb4d331621f780d01701
Default Alt Text
Utils.php (604 B)
Attached To
Mode
rK kolab
Attached
Detach File
Event Timeline