Small rewrite.
Allow passing wildcards to App::environment().
Merge pull request #6359 from vlakoff/app-environment

[5.0] Allow Passing Wildcards To App::environment()