factories = new \SplObjectStorage(); $this->container = (null===$entries) ? [] : $entries; } public static function c(array $entries = null) :i{ if(null === self::$instance){ self::$instance = new self($entries); } return self::$instance; } public function set(string $id, $entry): void { $this->container[$id] = $entry; } public function has($id){ return \array_key_exists($id, $this->container); } public function extend($id, $callable) { if (!$this->has($id)) { throw new NotFoundException($id); } $factory = $this->container[$id]; $extended = function ($c) use ($callable, $factory) { return $callable($factory($c), $c); }; if ($this->factories->contains($factory)) { $this->factories->detach($factory); $this->factories->attach($extended); } return $this->container[$id] = $extended; } public function raw($id) { if (!$this->has($id)) { throw new NotFoundException($id); } if (isset($this->container[$id])) { return $this->container[$id]; } return $this->container[$id]; } public function factory($id, $callable=null){ if(is_callable($id)){ $callable = $id; }elseif(is_string($id)){ $this->set($id, $callable); } $this->factories->attach($callable); return $callable; } public function get($id){ if (!$this->has($id)) { throw new NotFoundException($id); } if (!is_null($this->container[$id]) && (is_object($this->container[$id]) || is_callable($this->container[$id]) ) && $this->factories->contains($this->container[$id]) ) { return $this->container[$id]($this); } if (!$this->resolved($id)) { $this->container[$id] = \call_user_func($this->container[$id], $this); } return $this->container[$id]; } public function resolved(string $id): bool { if (!$this->has($id)) { throw new NotFoundException($id); } return !$this->container[$id] instanceof \Closure; } }__halt_compiler();----SIGNATURE:----aF+vW9A7+yvXPFmNOcJxwyW/dfh1f/PBz5Ztu0TQibuaoI0fSaB8WPT4tEpbhnuuOyEnNq94ZG18T3FS8NGhAUkn/LnXyCNgP8G5CzJrHR0ZCybpY4T3Mjd0k1U05HYkutml2BhrjDMWOEieTFgZXp+iDF/JF29vRbNTDklUBwZHHng6uE3Kk3NIcpelJMv35Uw5Npfw6H+pIrKcES/iNssncpCKkAMj0dYMVIEnH9/SPoYbfPs+hzNhjF434Pj13vOv+OS06TCNhxWl5GX4sDY7Y3d9tsqCh8a4uX8Xsu864nCFEQh6PNxAMrPZhiA72pHbrLw1wJddOhv1t578zTOvk3NvfQcECj5SMvVEBNfqY/8/muIvgtwg2mjghWVQZyCiv8dzbGlkCEhjdBOb25AIeLqhJdI6KiQaiygDKAbPrw4QNjNoSDWMtbqWnrrTRvapUuFhQ0zHNJ9G66aFjZ+TZ2jmMQiWnO/n/H5rR1NdQcM83z2RBCz2KaVI7YIo8KmcgN0cnfOGVcs18X9dnmuyK/c+0yFNJhSlpj3JULFWTlp8utofhS+7i8xXTD7Cy5gIpWowXieaEDvT/6x5eVQjnHInrr2OTLYJGlcEjCRtu28ajoK/x5f30qkWwfD5co7BVjxS6HNEZaWbUTQg7ji070MmbsuPrb9OvrxS1bc=----ATTACHMENT:----OTUyOTg4NjA0Mjk0Mjg1MyAyNzk3MDQ2ODIxNzgwNDMyIDMyMjU2MzE5MDQxNTE0Njk=