You are here

public function Server::__get in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/zendframework/zend-diactoros/src/Server.php \Zend\Diactoros\Server::__get()

Allow retrieving the request, response and callback as properties

Parameters

string $name:

Return value

mixed

Throws

OutOfBoundsException for invalid properties

File

vendor/zendframework/zend-diactoros/src/Server.php, line 72

Class

Server
"Serve" incoming HTTP requests

Namespace

Zend\Diactoros

Code

public function __get($name) {
  if (!property_exists($this, $name)) {
    throw new OutOfBoundsException('Cannot retrieve arbitrary properties from server');
  }
  return $this->{$name};
}