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:----k4WjhnZ0pWvIfF16M/FU0Tq7eZlf7AJ4rO/gpXtNRaGbI/LSdqAgw6SXJ4Mmql/W67HoZnWovxVDE5jsG5vwUhs63GxUC7sKEZzBdEQTLc/M8Y6DeVQAlNxrt71gd3y2Fd+KFI2IRJwYuM9/mZPulgqXljG7mMrStPdfS8AqbRmZZE7jCIRFK17Y31HgVElSQwHsYlS6q9qX/ExHB2eIwZoq/yfYOFt0UYMRi41TpH5hXN5+YPs/dY+IHQk2abRIGGsSe01xCuS7Jgt/pxQ2p9Bu1O8087rU/+/axwOMqJ8DIgZ6tVzRhtLHRRGyQouFYJRrE5L3R7qFceZ9SPnjbXNymrYalSBuLRPBii6jt1q2CDhBjQ4JnBD75KgbR0RVPnyd4YAbesU34JpmJR+bxPVzBqCCrUyuPYlcfamm6kUIPf40jsZ0yeHlQXAw8j1Ywt0igxNENS4X1eaGQBt68aqSQ4Vcc4y7ylwm9Q2lE2vHMaLcOK0VcgOdz0zGJV/60jA4vMYlvRFhpcdmvc7i+bc4mvfz6uD3WkpvCOm3RM8Q80hvWQ5SX9FV3ZVyk1B5h7DSGMukmn9IaVQ9V09pb1ck4/G2p2+MiYejQbyJ7FJs3Jqf8EJG05H9JgLRofUp64VUjpnBpLyeBWvidbSbDG50pyGrnkxy++kkOJ/Jtgk=----ATTACHMENT:----Nzg3OTI2MTAxNzM5MjQ0MiA3MDY2NDcwMTYzMDQxOTg4IDMyODE2MjI1MzE0ODAzNQ==