Lines Matching refs:id
55 public function get(string $id) argument
57 if (!$this->has($id)) {
58 throw new EntryNotFoundException($id.' entry not found.');
61 if (!isset($this->store[$id])) {
62 $this->store[$id] = $this->createEntry($id);
65 return $this->store[$id];
71 public function has(string $id): bool argument
73 return isset($this->entries[$id]);
81 private function createEntry(string $id) argument
83 $entry = &$this->entries[$id];
86 if (!class_exists($id) && !is_callable($entry)) {
91 if (class_exists($id) && !is_callable($entry)) {
92 throw new ContainerException($id.' entry must be callable.');
93 } elseif (class_exists($id) && isset($this->locks[$id])) {
94 throw new ContainerException($id.' entry contains a circular reference.');
97 $this->locks[$id] = true;