/** * @param array $keys */ public function __construct(array $keys) { if (!empty($keys)) { foreach ($keys as $value) { $key = new Key(); $key->setKey(isset($value['key']) ? $value['key'] : null); $key->setValue(isset($value['value']) ? $value['value'] : null); $key->setCas(isset($value['cas']) ? $value['cas'] : null); $this->addKey($value['key'], $key); } //sort the keys ksort($this->keys); } }