Issues

ZF2-576: AbstractPluginManager and creationOptions

Issue Type: Bug Created: 2012-09-20T07:50:43.000+0000 Last Updated: 2012-10-08T20:11:05.000+0000 Status: Closed Fix version(s): Reporter: Gandzy Ghennady (ghennady) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend\ServiceManager

Related issues: Attachments:

Description

Hi, I have a problem with the transfer options when using a custom filter or validator.

<pre class="highlight">
$config = array(
    'factories' => array(
        'myFilter' => function ($serviceLocator) {
            $instance = new MyFilter();
            // ... some init code
            return $instance;
        }
    )
);

$filterPlugin = new \Zend\Filter\FilterPluginManager(
    new \Zend\ServiceManager\Config($config)
);

$filterOptions = array(
    // some options
);

$filterPlugin->get('myFilter', $filterOptions);

//I expect must be called myFilter->setOptions($filterOptions)

The fact that $filterOptions transferred only in invokable classes, but what about the rest?

Comments

Posted by Ralph Schindler (ralph) on 2012-10-08T20:11:05.000+0000

This issue has been closed on Jira and moved to GitHub for issue tracking. To continue following the resolution of this issues, please visit: https://github.com/zendframework/zf2/issues/2601

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