File tree Expand file tree Collapse file tree 2 files changed +28
-1
lines changed
Expand file tree Collapse file tree 2 files changed +28
-1
lines changed Original file line number Diff line number Diff line change 44 "type" : " library" ,
55 "require" : {
66 "silex/silex" : " ~1.3" ,
7- "statflo/php-di" : " >=1.0 <2.0"
7+ "statflo/php-di" : " >=1.1 <2.0"
88 },
99 "license" : " COPYRIGHT" ,
1010 "authors" : [
Original file line number Diff line number Diff line change @@ -51,4 +51,31 @@ public function start(Application $app)
5151
5252 \Statflo \HTTP \Router::register ($ routes , $ app );
5353 }
54+
55+ private function defineSession ($ bootstrap , array $ configuration = [])
56+ {
57+ $ session = [];
58+
59+ if (isset ($ configuration ['session ' ])) {
60+ $ session = [$ configuration ['session ' ]];
61+ }
62+
63+ $ bootstrap ->define (
64+ 'statflo.session ' ,
65+ \Statflo \DI \DTO \Collection::class,
66+ $ session
67+ );
68+
69+ $ auth = [];
70+
71+ if (isset ($ configuration ['auth ' ])) {
72+ $ auth = [$ configuration ['auth ' ]];
73+ }
74+
75+ $ bootstrap ->define (
76+ 'statflo.auth ' ,
77+ \Statflo \DI \DTO \Auth::class,
78+ $ auth
79+ );
80+ }
5481}
You can’t perform that action at this time.
0 commit comments