Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F100494782
PhabricatorFactIntDatapoint.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, Jan 31, 06:09
Size
1 KB
Mime Type
text/x-php
Expires
Sun, Feb 2, 06:09 (1 d, 21 h)
Engine
blob
Format
Raw Data
Handle
23980160
Attached To
rPH Phabricator
PhabricatorFactIntDatapoint.php
View Options
<?php
final
class
PhabricatorFactIntDatapoint
extends
PhabricatorFactDAO
{
protected
$keyID
;
protected
$objectID
;
protected
$dimensionID
;
protected
$value
;
protected
$epoch
;
private
$key
;
private
$objectPHID
;
private
$dimensionPHID
;
protected
function
getConfiguration
()
{
return
array
(
self
::
CONFIG_TIMESTAMPS
=>
false
,
self
::
CONFIG_COLUMN_SCHEMA
=>
array
(
'id'
=>
'auto64'
,
'dimensionID'
=>
'id?'
,
'value'
=>
'sint64'
,
),
self
::
CONFIG_KEY_SCHEMA
=>
array
(
'key_dimension'
=>
array
(
'columns'
=>
array
(
'keyID'
,
'dimensionID'
),
),
'key_object'
=>
array
(
'columns'
=>
array
(
'objectID'
),
),
),
)
+
parent
::
getConfiguration
();
}
public
function
setKey
(
$key
)
{
$this
->
key
=
$key
;
return
$this
;
}
public
function
getKey
()
{
return
$this
->
key
;
}
public
function
setObjectPHID
(
$object_phid
)
{
$this
->
objectPHID
=
$object_phid
;
return
$this
;
}
public
function
getObjectPHID
()
{
return
$this
->
objectPHID
;
}
public
function
setDimensionPHID
(
$dimension_phid
)
{
$this
->
dimensionPHID
=
$dimension_phid
;
return
$this
;
}
public
function
getDimensionPHID
()
{
return
$this
->
dimensionPHID
;
}
public
function
newDatapointVector
()
{
return
$this
->
formatVector
(
array
(
$this
->
key
,
$this
->
objectPHID
,
$this
->
dimensionPHID
,
$this
->
value
,
$this
->
epoch
,
));
}
public
function
newRawVector
(
array
$spec
)
{
return
$this
->
formatVector
(
array
(
$spec
[
'key'
],
$spec
[
'objectPHID'
],
$spec
[
'dimensionPHID'
],
$spec
[
'value'
],
$spec
[
'epoch'
],
));
}
private
function
formatVector
(
array
$vector
)
{
return
implode
(
':'
,
$vector
);
}
}
Event Timeline
Log In to Comment