File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 20
20
21
21
class Session {
22
22
public function __construct ($ modules ) {
23
+ $ this ->modules = $ modules ;
24
+ $ this ->flushed = new \stdClass ;
23
25
$ this ->map = new \stdClass ;
24
26
$ this ->map ->_ = $ modules ->_ ;
25
- $ this ->flushed = array ();
26
- $ this ->modules = $ modules ;
27
27
}
28
28
public function add ($ module ) {
29
29
if (!property_exists ($ this ->map , $ module )) {
@@ -36,8 +36,8 @@ public function add($module) {
36
36
public function flush () {
37
37
$ output = array ();
38
38
foreach ($ this ->map as $ name => $ info ) {
39
- if (array_search ( $ name , $ this ->flushed , true ) === false ) {
40
- $ this ->flushed [] = $ name ;
39
+ if (! property_exists ( $ this ->flushed , $ name ) ) {
40
+ $ this ->flushed -> $ name = true ;
41
41
$ output [] = $ info ->module ;
42
42
}
43
43
if (0 < strlen ($ info ->code ))
You can’t perform that action at this time.
0 commit comments