public function addPath($path)
 {
     $this->scanner->addPath($path = FileUtils::realpath($path));
     $this->pathList[$path] = $path;
     $this->built = false;
     return $this;
 }
 /**
  * helper method which finds layout from most concrete folder to module folder
  */
 public function searchLayout()
 {
     $sourceDir = FileUtils::normalize(dirname((new \ReflectionClass($this))->getFileName()));
     $appDir = FileUtils::realpath($this->configuration->getDir('app'));
     while ($sourceDir !== $appDir) {
         if (file_exists($layout = $sourceDir . '/templates/layout.picco')) {
             $this->template->setResource(new File($layout));
             break;
         }
         $sourceDir = dirname($sourceDir);
     }
 }