@@ -60,7 +60,7 @@ public function getConfigSchema(): Nette\Schema\Schema
6060 'mapping ' => Expect::arrayOf ('string|array ' ),
6161 'scanDirs ' => Expect::anyOf (Expect::arrayOf ('string ' ), false )->default ($ this ->scanDirs ),
6262 'scanComposer ' => Expect::bool (class_exists (ClassLoader::class)),
63- 'scanFilter ' => Expect::string ('Presenter ' ),
63+ 'scanFilter ' => Expect::string ('* Presenter ' ),
6464 'silentLinks ' => Expect::bool (),
6565 ]);
6666 }
@@ -156,7 +156,7 @@ private function findPresenters(): array
156156 }
157157 $ robot = new Nette \Loaders \RobotLoader ;
158158 $ robot ->addDirectory (...$ config ->scanDirs );
159- $ robot ->acceptFiles = [' * ' . $ config ->scanFilter . '* .php ' ];
159+ $ robot ->acceptFiles = [$ config ->scanFilter . '.php ' ];
160160 if ($ this ->tempDir ) {
161161 $ robot ->setTempDirectory ($ this ->tempDir );
162162 $ robot ->refresh ();
@@ -188,7 +188,7 @@ private function findPresenters(): array
188188 $ presenters = [];
189189 foreach (array_unique ($ classes ) as $ class ) {
190190 if (
191- strpos ( $ class , $ config ->scanFilter ) !== false
191+ fnmatch ( $ config ->scanFilter , $ class )
192192 && class_exists ($ class )
193193 && ($ rc = new \ReflectionClass ($ class ))
194194 && $ rc ->implementsInterface (Nette \Application \IPresenter::class)
0 commit comments