container[$name] = $pool; return $this; } function get(string $name):?AbstractPool { if(isset($this->container[$name])){ return $this->container[$name]; } return null; } function resetAll() { /** @var AbstractPool $item */ foreach ($this->container as $item){ $item->destroy(); } } }