mirror of
https://github.com/peklaiho/madlisp.git
synced 2025-02-03 06:35:42 +08:00
15 lines
260 B
PHP
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");
|
|
}
|
|
}
|