メインコンテンツへスキップ

SinglePHPInstanceManager

A minimal PHP instance manager that manages a single PHP instance.

Unlike PHPProcessManager, this does not maintain a pool of instances or implement concurrency control. It simply returns the same PHP instance for every request.

This is suitable for CLI contexts where:

  • Only one PHP instance is needed
  • Runtime rotation is handled separately via php.enableRuntimeRotation()
  • Concurrency is not a concern (each worker has its own instance)

Implements

Index

Constructors

constructor

Methods

[asyncDispose]

  • [asyncDispose](): Promise<void>
  • Returns Promise<void>

acquirePHPInstance

  • Acquire a PHP instance for processing a request.


    Returns Promise<AcquiredPHP>

    An acquired PHP instance with a reap function.

getPrimaryPhp

  • getPrimaryPhp(): Promise<PHP>
  • Get the primary PHP instance. This instance is persistent and never killed.


    Returns Promise<PHP>