mini\Mini::getRequestScope() Method

public

Signature

public function getRequestScope(): object

Returns

object

Documentation

An object that uniquely identifies the current request scope.

This function is intended to be used for caching in WeakMap, instances that are request specific and should survive for the duration of the request only.

Returns:

  • Current Fiber if in fiber context (Swerve, ReactPHP, RoadRunner)
  • $this if in traditional PHP-FPM request (after bootstrap() called)

Source

src/Mini.php:225-240