src/Injector.php
public static function inject($injector, $package)
    {
        $dir = __DIR__."/../../$package/src/Injectors";
        $files = is_dir($dir) ? scandir($dir) : [];

        foreach ($files as $file) {
            if (substr($file, 0, -4) == $injector and substr($file, -4) == '.php') {
                $file = $dir.'/'.$file;

                return include $file;
            }
        }

        return '';
    }
public static function inject($injector, $package)
    {
        $dir = __DIR__."/../../$package/src/Injectors";
        $files = is_dir($dir) ? scandir($dir) : [];

        foreach ($files as $file) {
            if (substr($file, 0, -4) == $injector and substr($file, -4) == '.php') {
                $file = $dir.'/'.$file;

                return include $file;
            }
        }

        return '';
    }
public static function inject ( $ injector , $ package ) { $ dir = __DIR__ . "/../../$package/src/Injectors" ; $ files = is_dir ( $ dir ) ? scandir ( $ dir ) : [ ] ; foreach ( $ files as $ file ) { if ( substr ( $ file , 0 , - 4 ) == $ injector and substr ( $ file , - 4 ) == '.php' ) { $ file = $ dir . '/' . $ file ; return include $ file ; } } return '' ; }
Returns the injection of the specified injector and package.

@param string $package
Returns the injection of the specified injector and package .