Welcome Guest, Not a member yet? Register   Sign In
triggerFilter in Event
#3

(12-03-2018, 06:56 AM)kilishan Wrote: Interesting idea, but it has a very real problem that filters expect to be able to modify the request/response or return their own response, and calling a filter within an event negates all of those abilities.

The filter you are trying to replicate from Wordpress is fundamentally different enough from the Controller Filters that CI provides that I don't think they're compatible.

To allow filters on content, you'd be better served creating something new and specific for that use, I think.

Thank you for your opinion.

For now, I think I'll have to use above code I added. 
That is a quite simple way, if there isn't another simple awesome way.

By the way, CI4 Events concept is very nice. I think this is similar to Action (Hook) concept of WordPress.
So, I just added that triggerFilter (Filter Hook) function.
Reply


Messages In This Thread
triggerFilter in Event - by eterv - 12-03-2018, 01:09 AM
RE: triggerFilter in Event - by kilishan - 12-03-2018, 06:56 AM
RE: triggerFilter in Event - by eterv - 12-03-2018, 08:49 AM



Theme © iAndrew 2016 - Forum software by © MyBB