Page MenuHomeSealhub

ArcanistDictionaryConfigurationSource.php
No OneTemporary

Authored By
Unknown
Size
927 B
Referenced Files
None
Subscribers
None

ArcanistDictionaryConfigurationSource.php

<?php
abstract class ArcanistDictionaryConfigurationSource
extends ArcanistConfigurationSource {
private $values;
public function __construct(array $dictionary) {
$this->values = $dictionary;
}
public function getAllKeys() {
return array_keys($this->values);
}
public function hasValueForKey($key) {
return array_key_exists($key, $this->values);
}
public function getValueForKey($key) {
if (!$this->hasValueForKey($key)) {
throw new Exception(
pht(
'Configuration source ("%s") has no value for key ("%s").',
get_class($this),
$key));
}
return $this->values[$key];
}
public function setStorageValueForKey($key, $value) {
$this->values[$key] = $value;
$this->writeToStorage($this->values);
return $this;
}
protected function writeToStorage($values) {
throw new PhutilMethodNotImplementedException();
}
}

File Metadata

Mime Type
text/x-php
Expires
Fri, Nov 27, 20:17 (5 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1224259
Default Alt Text
ArcanistDictionaryConfigurationSource.php (927 B)

Event Timeline