Files
abcParser/axiom_src/Bags/ArrayBag.php
richard fb619dccbf
Some checks failed
abc-api/abcParser/pipeline/head There was a failure building this commit
import axiom without dependency on symfony console
2020-06-21 07:36:31 -04:00

34 lines
546 B
PHP

<?php
namespace Enzyme\Axiom\Bags;
class ArrayBag implements BagInterface
{
protected $store;
public function __construct(array $store)
{
$this->store = $store;
}
public function get($key)
{
if ($this->has($key)) {
return $this->store[$key];
}
return null;
}
public function has($key)
{
return isset($this->store[$key])
&& array_key_exists($key, $this->store);
}
public function getAll()
{
return $this->store;
}
}