Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F90470576
AlmanacAddress.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
Fri, Nov 1, 23:46
Size
1 KB
Mime Type
text/x-php
Expires
Sun, Nov 3, 23:46 (2 d)
Engine
blob
Format
Raw Data
Handle
22082391
Attached To
rPH Phabricator
AlmanacAddress.php
View Options
<?php
final
class
AlmanacAddress
extends
Phobject
{
private
$networkPHID
;
private
$address
;
private
$port
;
private
function
__construct
()
{
// <private>
}
public
function
getNetworkPHID
()
{
return
$this
->
networkPHID
;
}
public
function
getAddress
()
{
return
$this
->
address
;
}
public
function
getPort
()
{
return
$this
->
port
;
}
public
static
function
newFromDictionary
(
array
$dictionary
)
{
return
self
::
newFromParts
(
$dictionary
[
'networkPHID'
],
$dictionary
[
'address'
],
$dictionary
[
'port'
]);
}
public
static
function
newFromParts
(
$network_phid
,
$address
,
$port
)
{
$addr
=
new
AlmanacAddress
();
$addr
->
networkPHID
=
$network_phid
;
$addr
->
address
=
$address
;
$addr
->
port
=
(
int
)
$port
;
return
$addr
;
}
public
function
toDictionary
()
{
return
array
(
'networkPHID'
=>
$this
->
getNetworkPHID
(),
'address'
=>
$this
->
getAddress
(),
'port'
=>
$this
->
getPort
(),
);
}
public
function
toHash
()
{
return
PhabricatorHash
::
digestForIndex
(
json_encode
(
$this
->
toDictionary
()));
}
}
Event Timeline
Log In to Comment