Issues

ZF-9111: Break in Resolving Plugin Resource Name

Issue Type: Improvement Created: 2010-02-07T10:14:08.000+0000 Last Updated: 2010-10-26T02:34:59.000+0000 Status: Resolved Fix version(s): - 1.10.1 (10/Feb/10)

Reporter: Roy Fang (royfang) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_Application

Related issues: Attachments:

Description

Add break on Zend_Application_Bootstrap_BootstrapAbstract::_resolvePluginResourceName($resource) foreach loop:

<pre class="highlight">
protected function _resolvePluginResourceName($resource)
{
    if (isset($resource->_explicitType)) {
        $pluginName = $resource->_explicitType;
    } else  {
        $className  = get_class($resource);
        $pluginName = $className;
        $loader     = $this->getPluginLoader();
        foreach ($loader->getPaths() as $prefix => $paths) {
            if (0 === strpos($className, $prefix)) {
                $pluginName = substr($className, strlen($prefix));
                $pluginName = trim($pluginName, '_');
                break;    // break when $prefix found
            }
        }
    }
    $pluginName = strtolower($pluginName);
    return $pluginName;
}

Comments

Posted by Marc Hodgins (mjh_ca) on 2010-10-26T02:34:58.000+0000

Fixed by Matthew in r20985, made it in to 1.10.1 release. Marking as resolved.

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts