Provide before_filter-like functionality.