Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F539857
DiffusionCommitHash.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
DiffusionCommitHash.php
View Options
<?php
final
class
DiffusionCommitHash
extends
Phobject
{
private
$hashType
;
private
$hashValue
;
public
function
setHashValue
(
$hash_value
)
{
$this
->
hashValue
=
$hash_value
;
return
$this
;
}
public
function
getHashValue
()
{
return
$this
->
hashValue
;
}
public
function
setHashType
(
$hash_type
)
{
$this
->
hashType
=
$hash_type
;
return
$this
;
}
public
function
getHashType
()
{
return
$this
->
hashType
;
}
public
static
function
convertArrayToObjects
(
array
$hashes
)
{
$hash_objects
=
array
();
foreach
(
$hashes
as
$hash
)
{
$type
=
$hash
[
0
];
$hash
=
$hash
[
1
];
$hash_objects
[]
=
id
(
new
DiffusionCommitHash
())
->
setHashType
(
$type
)
->
setHashValue
(
$hash
);
}
return
$hash_objects
;
}
public
static
function
newFromDictionary
(
array
$map
)
{
$hash_type
=
idx
(
$map
,
'type'
);
$hash_value
=
idx
(
$map
,
'value'
);
return
id
(
new
self
())
->
setHashType
(
$hash_type
)
->
setHashValue
(
$hash_value
);
}
public
function
newDictionary
()
{
return
array
(
'type'
=>
$this
->
hashType
,
'value'
=>
$this
->
hashValue
,
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, May 12, 9:20 AM (1 d, 18 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
103627
Default Alt Text
DiffusionCommitHash.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment