@@ -56,7 +56,7 @@ public function getConfigSchema(): Nette\Schema\Schema
5656 'mapping ' => Expect::arrayOf ('string|array ' ),
5757 'scanDirs ' => Expect::anyOf (Expect::arrayOf ('string ' ), false )->default ($ this ->scanDirs ),
5858 'scanComposer ' => Expect::bool (class_exists (ClassLoader::class)),
59- 'scanFilter ' => Expect::string ('Presenter ' ),
59+ 'scanFilter ' => Expect::string ('* Presenter ' ),
6060 'silentLinks ' => Expect::bool (),
6161 ]);
6262 }
@@ -151,7 +151,7 @@ private function findPresenters(): array
151151 }
152152 $ robot = new Nette \Loaders \RobotLoader ;
153153 $ robot ->addDirectory (...$ config ->scanDirs );
154- $ robot ->acceptFiles = [' * ' . $ config ->scanFilter . '* .php ' ];
154+ $ robot ->acceptFiles = [$ config ->scanFilter . '.php ' ];
155155 if ($ this ->tempDir ) {
156156 $ robot ->setTempDirectory ($ this ->tempDir );
157157 $ robot ->refresh ();
@@ -183,7 +183,7 @@ private function findPresenters(): array
183183 $ presenters = [];
184184 foreach (array_unique ($ classes ) as $ class ) {
185185 if (
186- strpos ( $ class , $ config ->scanFilter ) !== false
186+ fnmatch ( $ config ->scanFilter , $ class )
187187 && class_exists ($ class )
188188 && ($ rc = new \ReflectionClass ($ class ))
189189 && $ rc ->implementsInterface (Nette \Application \IPresenter::class)
0 commit comments