Method
extends ConfigurationAnnotation
in package
The Method class handles the Method annotation parts.
Tags
Table of Contents
- $methods : array<string|int, mixed>
- An array of restricted HTTP methods.
- __construct() : mixed
- allowArray() : bool
- Only one method directive is allowed.
- getAliasName() : string
- Returns the annotation alias name.
- getMethods() : array<string|int, mixed>
- Returns the array of HTTP methods.
- setMethods() : mixed
- Sets the HTTP methods.
- setValue() : mixed
- Sets the HTTP methods.
Properties
$methods
An array of restricted HTTP methods.
private
array<string|int, mixed>
$methods
= []
Methods
__construct()
public
__construct(array<string|int, mixed> $values) : mixed
Parameters
- $values : array<string|int, mixed>
Return values
mixed —allowArray()
Only one method directive is allowed.
public
allowArray() : bool
Tags
Return values
bool —getAliasName()
Returns the annotation alias name.
public
getAliasName() : string
Tags
Return values
string —getMethods()
Returns the array of HTTP methods.
public
getMethods() : array<string|int, mixed>
Return values
array<string|int, mixed> —setMethods()
Sets the HTTP methods.
public
setMethods(array<string|int, mixed>|string $methods) : mixed
Parameters
- $methods : array<string|int, mixed>|string
-
An HTTP method or an array of HTTP methods
Return values
mixed —setValue()
Sets the HTTP methods.
public
setValue(array<string|int, mixed>|string $methods) : mixed
Parameters
- $methods : array<string|int, mixed>|string
-
An HTTP method or an array of HTTP methods