germania-kg/namespaced-filefinder

Callable to find files in namespaced directories

Installs: 25

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

pkg:composer/germania-kg/namespaced-filefinder

1.0.1 2021-01-11 07:38 UTC

This package is auto-updated.

Last update: 2025-09-11 17:47:28 UTC


README

Germania KG · NamespacedFileFinder

Installation

$ composer require germania-kg/namespaced-filefinder

Usage

The constructor requires a default directory to look in. An optional array with “namespaced” directories defines where to also have a look:

<?php

use Germania\NamespacedFileFinder\NamespacedFileFinder;  

$finder = new NamespacedFileFinder("/path/configs", [
  "@custom" => "/path/to/custom/configs"
]);

$found = $finder("app.yaml");
$found = $finder("@custom/app.yaml");

Unit tests

Either copy phpunit.xml.dist to phpunit.xml and adapt to your needs, or leave as is. Run PhpUnit test or composer scripts like this:

$ composer test
# or
$ vendor/bin/phpunit