Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93118382
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
Tue, Nov 26, 08:29
Size
1 KB
Mime Type
text/x-php
Expires
Thu, Nov 28, 08:29 (2 d)
Engine
blob
Format
Raw Data
Handle
22576055
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