public function applyFilter($position, $input)
    {
        // oops, invalid position
        if (!in_array($position, array('pre', 'post'))) {
            throw new \InvalidArgumentException("Cannot add filters to '$position'. Use 'pre' or 'post'");
        }

        // determine accessor
        $var = $position. 'Filters';

        if (!$this->$var) {
            return $input;
        }

        foreach ($this->$var as $filter) {
            $input = $filter($input);
        }
        return $input;
    }