madlisp/src/Hash.php
Pekka Laiho adc6ab99c3 classes
2020-05-28 11:55:58 +07:00

15 lines
260 B
PHP

<?php
namespace MadLisp;
class Hash extends Collection
{
public function get(string $key)
{
if ($this->has($key)) {
return $this->data[$key];
}
throw new MadLispException("hash does not contain key $key");
}
}