ZF-2441: Loader_PluginLoader should allow loading of classes without using any prefix

Description

Sometimes it may be useful to not specify a prefix to the path. In my special situation i want to load models with the PluginLoader and I want to follow restrictions made for the Controller, so the Models are name like "Module_BarModel", but for the default-Module it will only called "FooModel". If an empty string is given as prefix _formatPrefix will ever append an underscore

    protected function _formatPrefix($prefix)
    {
        return rtrim($prefix, '_') . '_';
    }

So, if i try to loader "FooModel", it will (at least) search for "_FooModel". It seems to be more useful, if empty strings as prefix will stay empty strings.

    protected function _formatPrefix($prefix)
    {
        return !empty($prefix) ? rtrim($prefix, '_') . '_' : '';
    }

Comments

Please evaluate and assign as necessary.

One mission of Zend framework is to establish best practices. One aspect of plugin loading is to promote the idea of namespaced classes that can serve as replacements for existing functionality. These two combined bring us to the recommendation that plugin classes should have class prefixes to prevent naming collisions.