Changeset View
Changeset View
Standalone View
Standalone View
src/applications/fact/storage/PhabricatorFactIntDatapoint.php
Show First 20 Lines • Show All 52 Lines • ▼ Show 20 Lines | public function setDimensionPHID($dimension_phid) { | ||||
$this->dimensionPHID = $dimension_phid; | $this->dimensionPHID = $dimension_phid; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function getDimensionPHID() { | public function getDimensionPHID() { | ||||
return $this->dimensionPHID; | 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); | |||||
} | |||||
} | } |