| @@ 58-69 (lines=12) @@ | ||
| 55 | ||
| 56 | } |
|
| 57 | ||
| 58 | public function remove($id) { |
|
| 59 | ||
| 60 | $pools = $this->getInnerIterator(); |
|
| 61 | ||
| 62 | if ( isset($pools[$id]) ) { |
|
| 63 | unset($pools[$id]); |
|
| 64 | return true; |
|
| 65 | } |
|
| 66 | ||
| 67 | throw new Exception("Provider $id not registered into the stack"); |
|
| 68 | ||
| 69 | } |
|
| 70 | ||
| 71 | public function get($id) { |
|
| 72 | ||
| @@ 71-79 (lines=9) @@ | ||
| 68 | ||
| 69 | } |
|
| 70 | ||
| 71 | public function get($id) { |
|
| 72 | ||
| 73 | $pools = $this->getInnerIterator(); |
|
| 74 | ||
| 75 | if ( isset($pools[$id]) ) return $pools[$id][0]; |
|
| 76 | ||
| 77 | throw new Exception("Provider $id not registered into the stack"); |
|
| 78 | ||
| 79 | } |
|
| 80 | ||
| 81 | public function getAll($enabled = false) { |
|
| 82 | ||