public function filter($section, callable $function, array $params = array('this'), $order = 10)
    {
        if ($section == 'response') {
            foreach ($params as $key => $value) {
                if (empty($value) || $value == 'this') {
                    unset($params[$key]);
                }
            }
            $key = false;
        } elseif (!in_array($section, array('metadata', 'css', 'styles', 'html', 'javascript', 'scripts', 'head', 'body', 'page'))) {
            $error = "'{$section}' cannot be filtered";
        } else {
            if (false === $key = array_search('this', $params)) {
                $error = "'this' must be listed in the \$params so that we can give you something to filter";
            }
        }
        if (isset($error)) {
            throw new \LogicException($error);
        }
        $this->filters[$section][] = array('function' => $function, 'params' => $params, 'order' => $order, 'key' => $key);
    }