Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 7, 2024 via composer

nette/robot-loader v4.0.1

πŸ€ Nette RobotLoader: high performance and comfortable autoloader that will search and autoload classes within your application.
Package summary
Share
2
issues
2
high severity
license
2
1
license
2
(BSD-3-Clause OR GPL-2.0-only OR GPL-3.0-only)
Package created
20 Mar 2014
Version published
26 Sep 2023
Maintainers
1
Total deps
2
Direct deps
1
License
BSD-3-Clause OR GPL-2.0-only OR GPL-3.0-only

Issues

2

2 high severity issues

high
Recommendation: Validate that the license expression complies with your license policy
via: nette/robot-loader@v4.0.1
Recommendation: Validate that the license expression complies with your license policy
via: nette/utils@v4.0.4
Collapse
Expand

Licenses

(BSD-3-Clause OR GPL-2.0-only OR GPL-3.0-only)

Expression
2 Packages, Including:
nette/robot-loader@v4.0.1
nette/utils@v4.0.4
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

1
All Dependencies CSV
β“˜ This is a list of nette/robot-loader 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
nette/utilsv4.0.461.98 kB(BSD-3-Clause OR GPL-2.0-only OR GPL-3.0-only)
prod
1

Visualizations

Frequently Asked Questions

What does nette/robot-loader do?

Nette's RobotLoader is a cutting-edge autoloading tool engineered to deliver high performance alongside the comfort of automated class loading for your entire application, including third-party libraries. The significance of RobotLoader is its ability to rid your code of 'require' directives. It does this by taking on the arduous task of identifying, locating, and loading PHP classes on your behalf. This functionality extends even when the code does not follow strict directory or file naming conventions. With a track record for extreme speed and automatic cache updates, RobotLoader is widely recognized as a mature, stable, and sought-after library.

How do you use nette/robot-loader?

To start using RobotLoader, ensure that you have PHP version 8.0 (or higher) installed. Since the recommended method of installation is via Composer, you first need to require the package by running:

composer require nette/robot-loader

With the package now part of your project, you can make use of RobotLoader by creating a new instance and providing the directories to be indexed as well as the location for cache storage:

$loader = new Nette\Loaders\RobotLoader;

// Include directories to be indexed by RobotLoader (including subdirectories)
$loader->addDirectory(__DIR__ . '/app');
$loader->addDirectory(__DIR__ . '/libs');

// Use 'temp' directory for cache storage
$loader->setTempDirectory(__DIR__ . '/temp');
$loader->register(); // Activate the RobotLoader

This will allow RobotLoader to scan all your PHP scripts and record the classes and interfaces found in them, hence eliminating the necessity of manually using 'require'.

Where are the nette/robot-loader docs?

The documentation for Nette's RobotLoader is not provided on the GitHub page. However, you can obtain comprehensive details about using the tool from the Nette Framework's official website. Moreover, the readme file provided in the nette/robot-loader GitHub repository offers significant insights and usage cases into how to effectively implement RobotLoader in your project.