protected function createAfterFilter() {
    $after = $this->after;

    return function ($request, $response) use ($after) {
      foreach ($after as $filter) {
        $filter->onAfter($request, $response);
      }
    };
  }