protected function resolveStack()
	{
		if ($this->stack !== null) {
			return $this->stack;
		}

		$this->stack = new StackBuilder;

		foreach ($this->middlewares as $middleware) {
			call_user_func_array([$this->stack, 'push'], (array) $middleware);
		}

		return $this->stack;
	}