Exemple #1
0
 public function basePathUsage()
 {
     $loc = new Locator();
     $loc->setRoot(dirname(__FILE__) . '/../..');
     $loc->addPath('Provider');
     $this->assert($loc('Fs/TestClass.php'), 'The locator should have found the provider test class.');
 }
 public function views(Module\ModuleInterface $module, callable $container)
 {
     if ($module instanceof Module\ViewScriptAwareInterface) {
         $locator = new Fs\Locator();
         $locator->setRoot($module->path());
         $locator->addPaths($module->viewPaths());
         $container('viewLocators')->append($locator);
     }
 }
Exemple #3
0
 private function applyViewPaths(Locator $locator)
 {
     $paths = new Locator($this->path);
     $paths->addPaths((array) $this->classConfig->viewPaths, false);
     $locator->addPaths($paths);
 }