Is this even possible? By using a custom route like:
$route['ajax/:any'] = "ajax/route";
And then declaring the method private in the controller:
class Ajax extends Controller {
function _route()
{
some code here...
}
}
I know this example does not work in practice, but you get the idea.