Hi Matthew,
> Typically, by the bootstrap event, your SM (and all plugin managers
> managed by it) should be fully configured.
I played around for two hours now but I did not manage to use a custom
filter within an InputFilter object. Could you please provide a code
example?
I managed to use my custom filter with this code in my modules bootstrap:
-----------------------------------------------------------------------
StaticFilter::getPluginManager()->setInvokableClass(
'stringToUrl', 'TravelloLib\Filter\StringToUrl'
);
-----------------------------------------------------------------------
The filter is working.
Then I tried to add this filter within an InputFilter object. I noticed
that each input object creates its own Zend\Filter\FilterChain instance
which again creates its own Zend\Filter\FilterPluginManager instance.
The FilterPluginManager itself has a fixed list of built-in filters. To
add my own custom filters I would need to grab this FilterPluginManager
instance and call the setInvokableClass() like in the StaticFilter
example above.
That seems to be to complicated.
But I cannot create my own extensionm of the FilterPluginManager class
since its hardcoded.
Then I found /zendframework/zendframework/bin/pluginmap_generator.php
and hoped that this could be of any help. But this script fails:
-----------------------------------------------------------------------
Creating plugin class map for classes in
'/home/devhost/myDomain/vendor/ralfeggert/travello-lib'...
PHP Notice: Undefined property: Zend\File\PhpClassFile::$classname in
/home/devhost/myDomain/vendor/zendframework/zendframework/bin/pluginmap_generator.php
on line 135
PHP Notice: Undefined property: Zend\File\PhpClassFile::$classname in
/home/devhost/myDomain/vendor/zendframework/zendframework/bin/pluginmap_generator.php
on line 136
PHP Fatal error: Cannot access empty property in
/home/devhost/myDomain/vendor/zendframework/zendframework/bin/pluginmap_generator.php
on line 138
-----------------------------------------------------------------------
Regards,
Ralf
--
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]