dev-master
9999999-dev https://github.com/wake/Silex-Struct-LoaderSilex 2 service provider (and trait) for Struct Loader library.
MIT
The Requires
- php >=5.3.0
- silex/silex ~2
by Wake Liu
php silex loader silex2
Wallogit.com
2017 © Pedro Peláez
Silex 2 service provider (and trait) for Struct Loader library.
An easier way to load php files in Silex 2., (*1)
Only load
.phpfile and no need to fill file extension., (*2)
Autoload whole directory:, (*3)
$app->autoload ('path/to/load');
Autoload whole directory after specified files loaded:, (*4)
$app->autoload (['load-file-a-first', 'load-file-b-first'], 'path/to/load');
Load files:, (*5)
$app->load (['php-file-a', 'php-file-b'], 'path/to/files');
Load files structurally:, (*6)
$app->load (['subpath' => ['php-file-a', 'php-file-b']], 'path/to/files');
Add in your composer.json with following require entry:, (*7)
{
"require": {
"wake/Silex-File-Loader": "*"
}
}
or using composer:, (*8)
$ composer require wake/Silex-File-Loader:*
then run composer install or composer update., (*9)
class MyApplication extends Silex\Application {
use Silex\Application\FileLoaderTrait;
}
Please feel free to open an issue and let me know if there is any thoughts or questions :smiley:, (*10)
Released under the MIT license, (*11)
Silex 2 service provider (and trait) for Struct Loader library.
MIT
php silex loader silex2