Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F98084021
DivinerAtomRef.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Jan 9, 15:06
Size
1 KB
Mime Type
text/x-php
Expires
Sat, Jan 11, 15:06 (1 d, 14 h)
Engine
blob
Format
Raw Data
Handle
23501725
Attached To
rPH Phabricator
DivinerAtomRef.php
View Options
<?php
final
class
DivinerAtomRef
{
private
$project
;
private
$context
;
private
$type
;
private
$name
;
public
function
setName
(
$name
)
{
$this
->
name
=
$name
;
return
$this
;
}
public
function
getName
()
{
return
$this
->
name
;
}
public
function
setType
(
$type
)
{
$this
->
type
=
$type
;
return
$this
;
}
public
function
getType
()
{
return
$this
->
type
;
}
public
function
setContext
(
$context
)
{
$this
->
context
=
$context
;
return
$this
;
}
public
function
getContext
()
{
return
$this
->
context
;
}
public
function
setProject
(
$project
)
{
$this
->
project
=
$project
;
return
$this
;
}
public
function
getProject
()
{
return
$this
->
project
;
}
public
function
toDictionary
()
{
return
array
(
'project'
=>
$this
->
getProject
(),
'context'
=>
$this
->
getContext
(),
'type'
=>
$this
->
getType
(),
'name'
=>
$this
->
getName
(),
);
}
public
function
toHash
()
{
$dict
=
$this
->
toDictionary
();
ksort
(
$dict
);
return
md5
(
serialize
(
$dict
)).
'S'
;
}
public
static
function
newFromDictionary
(
array
$dict
)
{
$obj
=
new
DivinerAtomRef
();
$obj
->
project
=
idx
(
$dict
,
'project'
);
$obj
->
context
=
idx
(
$dict
,
'context'
);
$obj
->
type
=
idx
(
$dict
,
'type'
);
$obj
->
name
=
idx
(
$dict
,
'name'
);
return
$obj
;
}
}
Event Timeline
Log In to Comment