bgaze / silex-finder-provider
This package is abandoned and no longer maintained.
No replacement package was suggested.
A Silex service provider for Symfony finder component
dev-master
2017-08-27 16:14 UTC
Requires
- php: >=5.6.0
- silex/silex: ~2.0
- symfony/finder: ~3.0
Requires (Dev)
- phpunit/phpunit: 6.*
This package is auto-updated.
Last update: 2020-01-17 16:52:11 UTC
README
A Silex service provider for Symfony finder component.
Install
composer require bgaze/silex-finder-provider dev-master
Usage
Once the provider is registred, a Symfony Finder Component instance is available through $app['finder']
.
$app->register(new \Bgaze\Silex\Provider\FinderProvider()); $app["finder"]->files()->in(__DIR__); foreach ($app["finder"] as $file) { // Dump the absolute path var_dump($file->getRealpath()); // Dump the relative path to the file, omitting the filename var_dump($file->getRelativePath()); // Dump the relative path to the file var_dump($file->getRelativePathname()); }