machuga/codeigniter-filter — pull request #2 by edmundask (2012-04-07 10:03:37+00:00)
Title: Allow having controller method params array in filters

Hi again,

I hope it's not getting annoying me poking around at your code but I found most of your stuff quite useful. Anyway, I've read your [post](http://matthewmachuga.com/post/7181182435/codeigniter-filter-revisited) about CodeIgniter controller filters and in one example you showed how to DRY out controllers by adding a separate method for fetching the resource (in your example `get_resource()`). Well, this doesn't work with your current code here on github, so I decided to take a look at it.

Turns out filters don't get the params array, therefore doing something like this `$id = $params[0];` inside the filter isn't possible. I fixed the problem but I'm not sure if that's how you intended it to be.

I'll probably make my own controller filter support based on your code to better suit for my liking.

Cheers.