public static function startNewContext(string $name, bool $inherit = true)
    {
        if ($inherit)
        {
            $current = static::getInjector();
            $new_injector = new Injector($current);
        }
        else
            $new_injector = new Injector();

        return static::$injectors[$name] = $new_injector;
    }
public static function startNewContext(string $name, bool $inherit = true)
    {
        if ($inherit)
        {
            $current = static::getInjector();
            $new_injector = new Injector($current);
        }
        else
            $new_injector = new Injector();

        return static::$injectors[$name] = $new_injector;
    }
public static function startNewContext ( string $ name , bool $ inherit = true ) { if ( $ inherit ) { $ current = static :: getInjector ( ) ; $ new_injector = new Injector ( $ current ) ; } else $ new_injector = new Injector ( ) ; return static :: $ injectors [ $ name ] = $ new_injector ; }
Start a new injection context. Useful to be able to release
all static context to a certain run of the software, for example
in testing.

@param string $name A name for the injection context
@param bool $inherit True to inherit instances from the current injector,
false to start with an empty set.
Start a new injection context . Useful to be able to release all static context to a certain run of the software for example in testing .