Server
in package
implements
OpenApiAttributeInterface
The attribute may be applied at class or method level, or in {@see \OpenApi\Attributes\Operation::$servers} to define servers for the single operation (when applied at method level) or for all operations of a class (when applied at class level). It can also be used in {@see \OpenApi\Attributes\OpenAPIDefinition::$servers} to define spec level servers.
Interfaces, Classes, Traits and Enums
Table of Contents
- $description : string
- $extensions : array<string|int, mixed>
- $url : string
- $variables : array<string|int, mixed>
- __construct() : mixed
Properties
$description
public
string
$description
= ""
$extensions
public
array<string|int, mixed>
$extensions
= []
$url
public
string
$url
= ""
$variables
public
array<string|int, mixed>
$variables
= []
Methods
__construct()
public
__construct([string $url = "" ][, string $description = "" ][, array<string|int, ServerVariable> $variables = [] ][, array<string|int, Extension> $extensions = [] ]) : mixed
Parameters
- $url : string = ""
-
Required. A URL to the target host. This URL supports Server Variables and may be relative, to indicate that the host location is relative to the location where the OpenAPI definition is being served. Variable substitutions will be made when a variable is named in {brackets}.
- $description : string = ""
-
An optional string describing the host designated by the URL. CommonMark syntax MAY be used for rich text representation.
- $variables : array<string|int, ServerVariable> = []
-
An array of variables used for substitution in the server's URL template.
- $extensions : array<string|int, Extension> = []
-
The list of optional extensions