private function apply_middleware()
    {
        if (empty($this->middleware)) {
            return;
        }

        foreach ($this->middleware as $hook => $args) {
            /**
             * Execute the middleware callback via snap_middleware_{$middleware} filter.
             *
             * This hook can return true to continue processing the route, bail via a redirect,
             * or return false to short circuit and move to the next route.
             *
             * @since  1.0.0
             *
             * @param Request $request The current request for quick access.
             * @return  bool Whether to continue processing this route.
             */
            if (\apply_filters($hook, Container::get('request'), ...$args) !== true) {
                $this->shortcircuit = true;
            }
        }
    }