Aerys\Root class Root implements Aerys\ServerObserver

Summary

Properties

Methods

Properties

$exists — public $exists
No documentation.
$path — public $path
No documentation.
$size — public $size
No documentation.
$mtime — public $mtime
No documentation.
$inode — public $inode
No documentation.
$buffer — public $buffer
No documentation.
$etag — public $etag
No documentation.
$handle — public $handle
No documentation.
$ranges — public $ranges
No documentation.
$boundary — public $boundary
No documentation.
$contentType — public $contentType
No documentation.

Methods

__construct — public function __construct(string $root, Amp\File\Driver $filesystem = null)
No documentation.
Type Parameter Description Default Value
string $root Document root none
Amp\File\Driver $filesystem Optional filesystem driver null
__invoke — public function __invoke(Aerys\Request $request, Aerys\Response $response)

Respond to HTTP requests for filesystem resources

Type Parameter Description Default Value
Aerys\Request $request No documentation. none
Aerys\Response $response No documentation. none
removeDotPathSegments — public function removeDotPathSegments(string $path): string

Normalize paths with relative dot segments in their path

This functionality is critical to avoid malicious URIs attempting to traverse the document root above the allowed base path.

Type Parameter Description Default Value
string $path No documentation. none
setOption — public function setOption(string $option, mixed $value)

Set a document root option

Type Parameter Description Default Value
string $option The option key (case-insensitve) none
mixed $value The option value to assign none
update — public function update(Aerys\Server $server): Amp\Promise

Receive notifications from the server when it starts/stops

Type Parameter Description Default Value
Aerys\Server $server No documentation. none