File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change 88 */
99 function session ()
1010 {
11- if (!(\Leaf \Config::get ('session.instance ' ))) {
12- \Leaf \Config::set ('session.instance ' , new \Leaf \Http \Session ());
11+ if (!(\Leaf \Config::getStatic ('session ' ))) {
12+ \Leaf \Config::singleton ('session ' , function () {
13+ return new \Leaf \Http \Session ();
14+ });
1315 }
1416
15- return \Leaf \Config::get ('session.instance ' );
17+ return \Leaf \Config::get ('session ' );
1618 }
1719}
1820
@@ -24,10 +26,12 @@ function session()
2426 */
2527 function flash ()
2628 {
27- if (!(\Leaf \Config::get ('flash.instance ' ))) {
28- \Leaf \Config::set ('flash.instance ' , new \Leaf \Flash ());
29+ if (!(\Leaf \Config::getStatic ('flash ' ))) {
30+ \Leaf \Config::singleton ('flash ' , function () {
31+ return new \Leaf \Flash ();
32+ });
2933 }
3034
31- return \Leaf \Config::get ('flash.instance ' );
35+ return \Leaf \Config::get ('flash ' );
3236 }
3337}
You can’t perform that action at this time.
0 commit comments