File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -89,12 +89,10 @@ public function map(Router $router)
8989 $ router ->group (['namespace ' => $ this ->namespace , 'as ' => 'core:: ' ], function (Router $ router ) {
9090 $ path = app_path ('Http/Routes ' );
9191
92- // GLOB_BRACE is defined as 0, check the source!
93- // https://github.com/php/php-src/blob/31e4afe3c3654f9c5ab2eafa3a02c62d41c58b47/ext/standard/dir.c#L154-L158
94- $ globBrace = defined ('GLOB_BRACE ' ) ? GLOB_BRACE : 0 ;
95- $ globFlag = $ globBrace ;
92+ $ AllFileIterator = new \RecursiveIteratorIterator (new \RecursiveDirectoryIterator ($ path ));
93+ $ PhpFileIterator = new \RegexIterator ($ AllFileIterator , '/^.+\.php$/i ' , \RecursiveRegexIterator::GET_MATCH );
9694
97- foreach (glob ( "{ $ path } /*{,/*}.php " , $ globFlag ) as $ file ) {
95+ foreach ($ PhpFileIterator as $ file => $ object ) {
9896 $ class = substr ($ file , strlen ($ path ));
9997 $ class = str_replace ('/ ' , '\\' , $ class );
10098 $ class = substr ($ class , 0 , -4 );
You can’t perform that action at this time.
0 commit comments