If the plaintiffs prevail in any class action litigation brought against any public entity, the amount of attorney fees which the plaintiffs' attorney is entitled to receive out of any award to the plaintiffs shall be determined by the court; except that such amount shall not exceed two hundred fifty thousand dollars. Such limitation shall apply where the public entity pays the attorney fees directly to the plaintiffs' attorneys or where the public entity is required to pay the attorney fees indirectly through any program it administers by reducing the benefits or amounts due to the individual plaintiffs.