Nette\Loaders\RobotLoader::register PHP Method

register() public method

Register autoloader.
public register ( $prepend = FALSE ) : self
return self
    public function register($prepend = FALSE)
    {
        $this->loadCache();
        spl_autoload_register([$this, 'tryLoad'], TRUE, (bool) $prepend);
        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::register