3 final class DiffusionCommitHash
extends Phobject
{
8 public function setHashValue($hash_value) {
9 $this->hashValue
= $hash_value;
13 public function getHashValue() {
14 return $this->hashValue
;
17 public function setHashType($hash_type) {
18 $this->hashType
= $hash_type;
22 public function getHashType() {
23 return $this->hashType
;
26 public static function convertArrayToObjects(array $hashes) {
27 $hash_objects = array();
28 foreach ($hashes as $hash) {
31 $hash_objects[] = id(new DiffusionCommitHash())
33 ->setHashValue($hash);
38 public static function newFromDictionary(array $map) {
39 $hash_type = idx($map, 'type');
40 $hash_value = idx($map, 'value');
43 ->setHashType($hash_type)
44 ->setHashValue($hash_value);
47 public function newDictionary() {
49 'type' => $this->hashType
,
50 'value' => $this->hashValue
,