Nette\Loaders\RobotLoader::addDirectory PHP Method

addDirectory() public method

Add path or paths to list.
public addDirectory ( $path ) : self
return self
    public function addDirectory($path)
    {
        $this->scanPaths = array_merge($this->scanPaths, (array) $path);
        return $this;
    }

Usage Example

 /**
  * Initializes the plugin autoloader.
  */
 public function beforeCompile()
 {
     foreach ($this->containerBuilder->parameters['plugins'] as $definition) {
         $this->loader->addDirectory($definition['location']);
     }
     $this->loader->register();
 }
All Usage Examples Of Nette\Loaders\RobotLoader::addDirectory