Alia function for "setAllowedMethods()".

@param string or list of string
483563
public function method(string $method, string ...$methods): self
    {
        array_unshift($methods, $method);

        return $this->setAllowedMethods($methods);
    }
777951
public void setAllowedMethods(RequestTypeEnum... theAllowedMethods) {
		if (theAllowedMethods == null || theAllowedMethods.length == 0) {
			myAllowedMethods = null;
		} else {
			myAllowedMethods = new LinkedHashSet<RequestTypeEnum>();
			for (RequestTypeEnum next : theAllowedMethods) {
				myAllowedMethods.add(next);
			}
		}
		updateAllowHeader();
	}
1087195
@Override public Object invokeMethod(final String name, final Object arguments) {
    if (GantState.dryRun) {
      if (GantState.verbosity > GantState.SILENT) {
        final StringBuilder sb = new StringBuilder();
        int padding = 9 - name.length();
        if (padding < 0) { padding = 0; }
        sb.append("         ".substring(0, padding) + '[' + name + "] ");
        final Object[] args = (Object[]) arguments;
        if (args[0] instanceof Map<?,?>) {
          //////////////////////////////////////////////////////////////////////////////////////////////////////////
          // Eclipse and IntelliJ IDEA warn that (Map) is not a proper cast but using the
          // cast (Map<?,?>) causes a type check error due to the capture algorithm.
          //
          //  TODO : Fix this rather than use a SuppressWarnings.
          //////////////////////////////////////////////////////////////////////////////////////////////////////////
          @SuppressWarnings({ "unchecked", "rawtypes" } ) final Iterator<Map.Entry<?,?>> i =((Map) args[0]).entrySet().iterator();
          while (i.hasNext()) {
            final Map.Entry<?,?> e = i.next();
            sb.append(e.getKey() + " : '" + e.getValue() + '\'');
            if (i.hasNext()) { sb.append(", "); }
          }
          sb.append('\n');
          getProject().log(sb.toString());
          if (args.length == 2) {((Closure<?>) args[1]).call(); }
        }
        else if (args[0] instanceof Closure) { ((Closure<?>) args[0]).call(); }
        else { throw new RuntimeException("Unexpected type of parameter to method " + name); }
      }
      return null;
    }
    return super.invokeMethod(name, arguments);
  }
1222384
protected function setAllowed(array $allowed): void
	{
		$locales = $this->orm->locales->findAll();
		foreach ($locales as $locale) {
			/* @var $locale Locale */
			if (in_array($locale->id, $allowed)) {
				$locale->allowed = true;
			} else {
				$locale->allowed = false;
			}
			$this->orm->persist($locale);
		}
		$this->orm->flush();
	}
1280916
@Override
    public void onValueUnRestricted(final String value) {
        this.restrictedColumns.remove(value);
        
        // Check single column used in data set -> it cannot be unselected.
        if (listEditor.getList().size() == 1) {
            setEditorEnabled(0 ,false, DataSetEditorConstants.INSTANCE.dataSetMustHaveAtLeastOneColumn());
        } else {
            setEditorEnabled(value, true, null);
        }
    }
726122
public Collection<String> getAllowedMethods(String requestMethod) {

		Constraint.ensureNotEmpty(requestMethod, String.format("Invalid method '%s'", requestMethod));
		Set<String> rtAllowedMethods = new HashSet<String>(allowedMethods);
		rtAllowedMethods.add(requestMethod.toUpperCase());

		return rtAllowedMethods;
	}
1283404
@Override
    public void setMethod(String method) throws UnsupportedMethodException {
        MethodValues val = MethodValues.match(method, 0, method.length());
        if (null == val) {
            throw new UnsupportedMethodException("Illegal method " + method);
        }
        setMethod(val);
    }
602950
@SuppressWarnings({"ThrowableInstanceNeverThrown"})
    public static void validateVoid(Method method, List<Throwable> errors)
    {
        if (method.getReturnType() != Void.TYPE)
        {
            errors.add(new Exception("Method " + method.getName() + "() should be void"));
        }
    }
13564
function setAllowedTypes($allowed_types)
    {
        foreach ($allowed_types as $pair) {
            list($assoc_type, $session_type) = $pair;
            if (!Auth_OpenID_checkSessionType($assoc_type, $session_type)) {
                return false;
            }
        }

        $this->allowed_types = $allowed_types;
        return true;
    }
1245252
public static function setMethod($method) {

		if(false === is_string($method)) {
  			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($method)), E_USER_ERROR);
  		}

		$_SERVER['REQUEST_METHOD'] = strtoupper($method);
	}
1288899
@SuppressWarnings({"ThrowableInstanceNeverThrown"})
    public static void validateIsStatic(Method method, List<Throwable> errors)
    {
        if (!Modifier.isStatic(method.getModifiers()))
        {
            errors.add(new Exception("Method " + method.getName() + "() should be static"));
        }
        if (!Modifier.isPublic(method.getDeclaringClass().getModifiers()))
        {
            errors.add(new Exception("Class " + method.getDeclaringClass().getName() + " should be public"));
        }
    }
746819
private void setMethods(String methodList) {
        String[] methodNames = methodList.trim().split(",");
        for (String methodName : methodNames) {
            HttpMethod method = HttpMethod.valueOf(methodName.trim().toUpperCase());
            Utils.require(method != null, "Unknown REST method: " + methodName);
            m_methods.add(method);
        }
    }
309139
public boolean isMethodAllowed(String method) {

		return HttpMethod.isValidMethod(method) && (allowedMethods.isEmpty() || allowedMethods.contains(method));
	}
341013
public void setString(String value) {
		this.checkNull(value);
		list.add(value);
		type.add(String.class);
	}
1314726
public void setAllowMethods(String... methods) {
        allowMethodsSet.clear();
        for (String method : methods) {
            allowMethodsSet.add(method.toUpperCase());
        }
        allowMethods = Joiner.on(",").join(allowMethodsSet);
    }
624245
void setAuditAllowed(boolean auditAllowed) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            SibTr.entry(tc, "setAuditAllowed", Boolean.valueOf(auditAllowed));
        }

        _isAuditAllowed = auditAllowed;

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            SibTr.exit(tc, "setAuditAllowed");
        }
    }
737892
protected function validateMethod()
    {
        if (! in_array(strtoupper($this->option('method')), $methods = array_merge(Router::$verbs, ['ANY']))) {
            throw new MethodNotAllowedException($methods);
        }
    }