Ralf Eggert wrote > Hi Luke, > >> I think in your case it does make sense to call that custom Filter in >> your >> Service class as you've mentioned. I would do it this way. > > A couple of minutes ago I found Zend\Filter\StaticFilter which uses in > instance of Zend\Filter\FilterPluginManager. I am curious how to add my > custom filters to this FilterPluginManager. It should work like this: > > StaticFilter::getPluginManager()->setInvokableClass( > 'stringtourl', 'Application\Filter\StringToUrl' > ); > > Again the big question is where to add this line? > > - Module::onBootstrap() > - a listener > - trigger an event to add this > > Regards, > > Ralf
Hi Ralf, I was thinking that the other option would be to set that custom class in invokables in Service Config and then retrieve it and set in your service factory. ----- Cheers, -- Luke Mierzwa -- View this message in context: http://zend-framework-community.634137.n4.nabble.com/ZF2-create-custom-filter-tp4657029p4657040.html Sent from the Zend Framework mailing list archive at Nabble.com. -- List: [email protected] Info: http://framework.zend.com/archives Unsubscribe: [email protected]
