@@ -3,9 +3,6 @@ |
||
3 | 3 | |
4 | 4 | use Ffcms\Core\App; |
5 | 5 | use Ffcms\Core\Helper\Type\Obj; |
6 | -use Ffcms\Core\Helper\Type\Str; |
|
7 | -use Ffcms\Core\Helper\FileSystem\Directory; |
|
8 | -use Ffcms\Core\Helper\FileSystem\File; |
|
9 | 6 | |
10 | 7 | /** |
11 | 8 | * Class EventManager. Control and run events. |
@@ -87,11 +87,11 @@ discard block |
||
87 | 87 | { |
88 | 88 | // list app root's |
89 | 89 | foreach ($this->appRoots as $app) { |
90 | - $app .= '/Apps/Controller/' . env_name; |
|
90 | + $app .= '/Apps/Controller/'.env_name; |
|
91 | 91 | $files = File::listFiles($app, ['.php'], true); |
92 | 92 | foreach ($files as $file) { |
93 | 93 | // define full class name with namespace |
94 | - $class = 'Apps\Controller\\' . env_name . '\\' . Str::cleanExtension($file); |
|
94 | + $class = 'Apps\Controller\\'.env_name.'\\'.Str::cleanExtension($file); |
|
95 | 95 | // check if class exists (must be loaded over autoloader), boot method exist and this is controller instanceof |
96 | 96 | if (class_exists($class) && method_exists($class, 'boot') && is_a($class, 'Ffcms\Core\Arch\Controller', true)) { |
97 | 97 | $this->objects[] = $class; |
@@ -101,11 +101,11 @@ discard block |
||
101 | 101 | |
102 | 102 | // list widget root's |
103 | 103 | foreach ($this->widgetRoots as $widget) { |
104 | - $widget .= '/Widgets/' . env_name; |
|
104 | + $widget .= '/Widgets/'.env_name; |
|
105 | 105 | // widgets are packed in directory, classname should be the same with root directory name |
106 | 106 | $dirs = Directory::scan($widget, GLOB_ONLYDIR, true); |
107 | 107 | foreach ($dirs as $instance) { |
108 | - $class = 'Widgets\\' . env_name . '\\' . $instance . '\\' . $instance; |
|
108 | + $class = 'Widgets\\'.env_name.'\\'.$instance.'\\'.$instance; |
|
109 | 109 | if (class_exists($class) && method_exists($class, 'boot') && is_a($class, 'Ffcms\Core\Arch\Widget', true)) { |
110 | 110 | $this->objects[] = $class; |
111 | 111 | } |