File tree Expand file tree Collapse file tree 3 files changed +3
-30
lines changed
src/Bridges/ApplicationDI Expand file tree Collapse file tree 3 files changed +3
-30
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ public function loadConfiguration()
4343 $ config = $ this ->getConfig ($ this ->defaults );
4444 }
4545
46- $ this ->validate ( $ config , $ this ->defaults , $ old ? 'nette.application ' : $ this ->name );
46+ $ this ->validateConfig ( $ this ->defaults , $ config , $ old ? 'nette.application ' : $ this ->name );
4747
4848 $ application = $ container ->addDefinition ('application ' ) // no namespace for back compatibility
4949 ->setClass ('Nette\Application\Application ' )
@@ -63,13 +63,4 @@ public function loadConfiguration()
6363 }
6464 }
6565
66-
67- private function validate (array $ config , array $ expected , $ name )
68- {
69- if ($ extra = array_diff_key ($ config , $ expected )) {
70- $ extra = implode (", $ name. " , array_keys ($ extra ));
71- throw new Nette \InvalidStateException ("Unknown option $ name. $ extra. " );
72- }
73- }
74-
7566}
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ public function loadConfiguration()
5757 $ config ['xhtml ' ] = $ config ['nette ' ]['xhtml ' ];
5858 }
5959
60- $ this ->validate ( $ config , $ this ->defaults , $ this -> name );
60+ $ this ->validateConfig ( $ this ->defaults , $ config );
6161 $ container = $ this ->getContainerBuilder ();
6262
6363 $ latteFactory = $ container ->addDefinition ('nette.latteFactory ' )
@@ -115,13 +115,4 @@ public function addMacro($macro)
115115 ->addSetup ('?->onCompile[] = function($engine) { ' . $ macro . '($engine->getCompiler()); } ' , array ('@self ' ));
116116 }
117117
118-
119- private function validate (array $ config , array $ expected , $ name )
120- {
121- if ($ extra = array_diff_key ($ config , $ expected )) {
122- $ extra = implode (", $ name. " , array_keys ($ extra ));
123- throw new Nette \InvalidStateException ("Unknown option $ name. $ extra. " );
124- }
125- }
126-
127118}
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ public function loadConfiguration()
4444 $ config = $ this ->getConfig ($ this ->defaults );
4545 }
4646
47- $ this ->validate ( $ config , $ this ->defaults , $ old ? 'nette.routing ' : $ this ->name );
47+ $ this ->validateConfig ( $ this ->defaults , $ config , $ old ? 'nette.routing ' : $ this ->name );
4848
4949 $ router = $ container ->addDefinition ('router ' ) // no namespace for back compatibility
5050 ->setClass ('Nette\Application\IRouter ' )
@@ -61,13 +61,4 @@ public function loadConfiguration()
6161 }
6262 }
6363
64-
65- private function validate (array $ config , array $ expected , $ name )
66- {
67- if ($ extra = array_diff_key ($ config , $ expected )) {
68- $ extra = implode (", $ name. " , array_keys ($ extra ));
69- throw new Nette \InvalidStateException ("Unknown option $ name. $ extra. " );
70- }
71- }
72-
7364}
You can’t perform that action at this time.
0 commit comments