Setter for allowed HTTP verbs

@param string|array $allow A single HTTP verb or a collection of multiple entries

@author Benjamin Carl <opensource@clickalicious.de>
@return void
@access public
167368
public function setAllow($allow)
    {
        if (!is_array($allow)) {
            $allow = array($allow);
        }

        // Update ACL properties
        foreach ($allow as $verb) {
            $this->getAcl()->addPermission(
                $this->verbToOperation($verb)
            );
        }

        $this->allow = $allow;
    }
759010
protected function setMethodNotAllowedDecoratorMiddleware(array $allowed) : void
    {
        $middleware = $this->getStrategy()->getMethodNotAllowedDecorator(
            new MethodNotAllowedException($allowed)
        );

        $this->prependMiddleware($middleware);
    }
61455
public function setMethodAttribute($method)
    {
        if (is_array($method)) {
            $action = 0;
            foreach ($method as $verb) {
                $action = $action | VerbsMask::toNumeric($verb);
            }
        } else {
            $action = $method;
        }

        $this->attributes['method'] = $action;
    }
883017
public function setRequest(array $request)
    {
        parent::setRequest($request);

        if (isset($this->_request->term)) {
            $value = $this->getService('anahita:filter.term')->sanitize($this->_request->term);
            $this->_request->term = $value;
            $this->term = $value;
        }

        if (isset($this->_request->search_range)) {
            $value = (int) $this->_request->search_range;
            $this->_request->search_range = $value;
            $this->search_range = $value;
        }

        if ($this->_request->search_comments == 1 || $this->_request->search_comments == 'true') {
           $value = true;
        } else {
           $value = false;
        }

        $this->_request->search_comments = $value;
        $this->search_comments = $value;

        return $this;
    }
707848
public function setPermissionsAttribute($permissions)
    {
        if (! ($permissions instanceof ChannelPermission)) {
            return;
        }

        list($allow, $deny) = $permissions->bitwise;
        $this->allow        = $allow;
        $this->deny         = $deny;

        $this->attributes['permissions'] = $permissions;
    }
766675
final protected function validateCallable($value, array $allowed) : bool
    {
        if (true === in_array('callable', $allowed)) {
            if (true === is_callable($value)) {
                return true;
            }
        }

        return false;
    }
861993
public function allowConnectives($connectives)
    {
        $connectives = is_array($connectives) ? $connectives : func_get_args();
        if ($this->_allowedConnectives && $connectives != $this->_allowedConnectives) {
            throw new BadMethodCallException('You can only set the allowed connectives once.');
        }
        $this->_allowedConnectives = $connectives;
        $this->checkRestrictions();
        return $this;
    }
1174828
public static function allow(Subject $subject, array $verbs = null): Rule
    {
        return new self($subject, true, $verbs);
    }
1289401
private function push($allow, $excepted)
    {
        if ($excepted === null) {
            $excepted = '*';
        }

        $this->response->addHeader($allow, $excepted);

        return $this;
    }
1174415
public function setAllowedAttributes($allowedAttribs)
    {
        if (!is_array($allowedAttribs)) {
            $allowedAttribs = [$allowedAttribs];
        }

        // Store each attribute as allowed.
        foreach ($allowedAttribs as $attribute) {
            if (is_string($attribute)) {
                // Canonicalize the attribute name.
                $attributeName = strtolower($attribute);
                $this->allowedAttributes[$attributeName] = null;
            }
        }

        return $this;
    }
401334
public function set_supports( $support ) {
		if ( is_array( $support ) ) {
			$this->supports = $support;
			$this->update_arg( 'supports', $this->supports );
		}
	}
188748
public function setAllowMethods($methods)
    {
        $methods = (array) $methods;

        $methods = array_map('strtoupper', $methods);

        $this->allowMethods = $methods;

        return $this;
    }
321791
public function allows($ability, $arguments = array())
    {
        if (! is_array($arguments)) {
            $arguments = array_slice(func_get_args(), 1);
        }

        return $this->check($ability, $arguments);
    }
380053
public function allowMethods($methods = '*')
    {
        $methods = array_map('strtoupper', (array) $methods);
        $methods = implode(', ', $methods);

        $this->response = $this->response->withHeader('Access-Control-Allow-Methods', $methods);

        return $this;
    }
981917
public function setRules(array $rules)
    {
        $this->rules = [];
        foreach ($rules as $key => $value) {
            if (is_int($key)) {
                $routeRegex  = $value;
                $permissions = [];
            } else {
                $routeRegex  = $key;
                $permissions = (array) $value;
            }
            $this->rules[$routeRegex] = $permissions;
        }
    }
983170
public function allowMethods(array $methods = []): Route
    {
        $this->methods = [];
        foreach ($methods as $method) {
            $this->allowMethod($method);
        }

        return $this;
    }
163785
public function setLimits(array $limits = [])
    {
        if (empty($limits)) {
            throw new ListingException("You must provide at least one limit option");
        }

        $this->limits = array_values($limits);

        return $this;
    }