APPNETOS is under active development This website and its documentation are being prepared for public launch. Content and features may change.
Select Theme
Loading

Server

Runtime and configuration value injection.

Purpose & processing

Reads the named entry from the PHP $_SERVER array.

Parameters

Parameter Type Default Behavior
key string Required Key used to resolve the value.

Example

#[Server('HTTP_HOST')]
protected string|null $host = null;

Behavior and considerations

  • A missing key raises AnnotationException::serverKeyNotFound().
  • An existing key with a null value is accepted.
  • HTTP-specific server keys may be absent in cmd and worker contexts.

Source

shared/src/Core/Annotation/Server.php

Next Steps

Previous

Runtime

Explore Runtime

Next

HTTP Input

Explore HTTP Input