Skip to content

Commit

Permalink
ApplicationExtension: missing RobotLoader throws exception [Closes #78]
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Jun 17, 2015
1 parent 80fde4d commit e07f521
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Bridges/ApplicationDI/ApplicationExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ private function findPresenters()
$classes = [];

if ($config['scanDirs']) {
if (!class_exists('Nette\Loaders\RobotLoader')) {
throw new Nette\NotSupportedException("RobotLoader is required to find presenters, install package `nette/robot-loader` or disable option {$this->prefix('scanDirs')}: false");
}
$robot = new Nette\Loaders\RobotLoader;
$robot->setCacheStorage(new Nette\Caching\Storages\DevNullStorage);
$robot->addDirectory($config['scanDirs']);
Expand Down

0 comments on commit e07f521

Please sign in to comment.