flexsyscz / auto-loader
This package is abandoned and no longer maintained.
No replacement package was suggested.
Extension for Nette Framework providing the auto-loading of required classes.
dev-master / 1.0.x-dev
2023-08-07 07:02 UTC
Requires
- php: >=8.1
- flexsyscz/environment: ^1.0
- nette/di: ^v3.1
- nette/robot-loader: ^3.4
Requires (Dev)
- nette/bootstrap: ^3.1
- nette/coding-standard: ^3.3
- nette/tester: ^2.4
- phpstan/phpstan-nette: ^1.2
This package is auto-updated.
Last update: 2023-08-08 06:01:15 UTC
README
This library helps you with autoload of classes in your project.
Requirements
- Requires PHP 8.1
Using
The config file uses NEON (https://ne-on.org). The example of a configuration is below:
parameters:
resourcesDir: ../Resources/
extensions:
autoloader: Flexsyscz\AutoLoader\AutoLoaderExtension
autoloader:
forms:
path: %resourcesDir%/Forms/
allow: .+FormFactory$
ignore: ^HelloFormFactory$
controls:
path: %resourcesDir%/Controls/
allow: .+Control$
services:
- Tests\Resources\TestClass
Example above shows you how to define autoload of forms and controls in your app. Let's take a look at the parameters by which we can control the autoloader.
Parameter | Description |
---|---|
path | defines where the autoloader will seek a classes |
allow | defines a regex mask of allowed classes |
ignore | defines a regex mask of ignored classes |