mirror of
https://github.com/standardebooks/web.git
synced 2025-07-16 03:16:36 -04:00
Update composer packages
This commit is contained in:
parent
58cc098058
commit
415aed8b31
59 changed files with 3352 additions and 2347 deletions
41
vendor/nette/robot-loader/readme.md
vendored
41
vendor/nette/robot-loader/readme.md
vendored
|
@ -14,11 +14,13 @@ Introduction
|
|||
RobotLoader is a tool that gives you comfort of automated class loading for your entire application including third-party libraries.
|
||||
|
||||
- get rid of all `require`
|
||||
- only necessary scripts are loaded
|
||||
- requires no strict file naming conventions
|
||||
- allows more classes in single file
|
||||
- extremely fast
|
||||
- no manual cache updates, everything runs automatically
|
||||
- highly mature, stable and widely used library
|
||||
|
||||
RobotLoader is extremely comfortable and addictive!
|
||||
RobotLoader is incredibly comfortable and addictive!
|
||||
|
||||
If you like Nette, **[please make a donation now](https://nette.org/donate)**. Thank you!
|
||||
|
||||
|
@ -46,7 +48,7 @@ The recommended way to install is via Composer:
|
|||
composer require nette/robot-loader
|
||||
```
|
||||
|
||||
It requires PHP version 5.6 and supports PHP up to 7.2.
|
||||
It requires PHP version 5.6 and supports PHP up to 7.3.
|
||||
|
||||
|
||||
Usage
|
||||
|
@ -76,3 +78,36 @@ This feature should be disabled on production server.
|
|||
If you want RobotLoader to skip some directory, use `$loader->excludeDirectory('temp')`.
|
||||
|
||||
By default, RobotLoader reports errors in PHP files by throwing exception `ParseError` (since PHP 7.0). It can be disabled via `$loader->reportParseErrors(false)`.
|
||||
|
||||
|
||||
PHP files analyzer
|
||||
------------------
|
||||
|
||||
RobotLoader can also be used to find classes, interfaces, and trait in PHP files without using the autoloading feature:
|
||||
|
||||
```php
|
||||
$loader = new Nette\Loaders\RobotLoader;
|
||||
$loader->addDirectory(__DIR__ . '/app');
|
||||
|
||||
// Scans directories for classes / intefaces / traits
|
||||
$loader->rebuild();
|
||||
|
||||
// Returns array of class => filename pairs
|
||||
$res = $loader->getIndexedClasses();
|
||||
```
|
||||
|
||||
When scanning files again, we can use the cache and unmodified files will not be analyzed repeatedly:
|
||||
|
||||
```php
|
||||
$loader = new Nette\Loaders\RobotLoader;
|
||||
$loader->addDirectory(__DIR__ . '/app');
|
||||
$loader->setTempDirectory(__DIR__ . '/temp');
|
||||
|
||||
// Scans directories using a cache
|
||||
$loader->refresh();
|
||||
|
||||
// Returns array of class => filename pairs
|
||||
$res = $loader->getIndexedClasses();
|
||||
```
|
||||
|
||||
Enjoy RobotLoader!
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue