Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

addFilter Extensibility #10

Closed
slider opened this issue Feb 9, 2012 · 5 comments
Closed

addFilter Extensibility #10

slider opened this issue Feb 9, 2012 · 5 comments

Comments

@slider
Copy link

slider commented Feb 9, 2012

I'd like to create my own Filter which is placed somewhere in my symfony2 structure while decoda is imported via the deps file.

So I tried to simply extend DecodaFilter, placed the filter in my bundle and called addFilter, which then doesn't work because Decoda is extracting the classname and later for some reason tries to require_once this file. This of course fails because my Custom Filter is located outside the decoda directory structure.

It there a way to work around this issue which I'm currently missing?

@milesj
Copy link
Owner

milesj commented Feb 9, 2012

Might be a few ways. You can add the directory that your Filter is located in into the include path or you can try including the file ahead of time.

If neither of those work, I can probably tweak the class a bit to handle dependency loading better.

@slider
Copy link
Author

slider commented Feb 10, 2012

Putting it there doesn't work in the environment we use since I cant access those vendor directories in the production environment at all for various reasons (I can't even put a symlink there).

If you already have an idea on how to change the interface I might be able to lend you a hand, just let me know.

@milesj
Copy link
Owner

milesj commented Feb 11, 2012

So you can't include your filter manually? include 'path/to/my/CustomFilter.php' ?

This should bring it into scope. I should add a class_exists check however.

@slider
Copy link
Author

slider commented Feb 14, 2012

This might work I think. Adding the class_exists check is probably a good idea in general.

@milesj
Copy link
Owner

milesj commented Feb 16, 2012

3.3 is now available: https://github.com/milesj/php-decoda/tags

@milesj milesj closed this as completed Feb 16, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants