Commit 354b7663 authored by Henrik Bjørnskov's avatar Henrik Bjørnskov Committed by Fabien Potencier

Register clean up

parent 0328d904
...@@ -143,11 +143,7 @@ class Application extends Container implements HttpKernelInterface, TerminableIn ...@@ -143,11 +143,7 @@ class Application extends Container implements HttpKernelInterface, TerminableIn
{ {
$this->providers[] = $provider; $this->providers[] = $provider;
$provider->register($this); parent::register($provider, $values);
foreach ($values as $key => $value) {
$this[$key] = $value;
}
return $this; return $this;
} }
...@@ -160,7 +156,10 @@ class Application extends Container implements HttpKernelInterface, TerminableIn ...@@ -160,7 +156,10 @@ class Application extends Container implements HttpKernelInterface, TerminableIn
*/ */
public function boot() public function boot()
{ {
if (!$this->booted) { if ($this->booted) {
return;
}
$this->booted = true; $this->booted = true;
foreach ($this->providers as $provider) { foreach ($this->providers as $provider) {
...@@ -173,7 +172,6 @@ class Application extends Container implements HttpKernelInterface, TerminableIn ...@@ -173,7 +172,6 @@ class Application extends Container implements HttpKernelInterface, TerminableIn
} }
} }
} }
}
/** /**
* Maps a pattern to a callable. * Maps a pattern to a callable.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment