public function setAcceptableMethods(array $acceptableMethods)
    {
        $this->acceptableMethods = $acceptableMethods;

        $this->addConstraint(function (Request $request) use ($acceptableMethods) {
            return in_array($request->getMethod(), $acceptableMethods);
        });
    }