Skip to main content

PHPInstanceManager

Minimal interface for managing PHP instances.

This interface allows PHPRequestHandler to work with different instance management strategies:

  • PHPProcessManager: Multiple PHP instances with concurrency control
  • SinglePHPInstanceManager: Single PHP instance for CLI contexts

Hierarchy

  • AsyncDisposable
    • PHPInstanceManager

Implemented by

Index

Methods

acquirePHPInstance

  • acquirePHPInstance(options?: { considerPrimary?: boolean }): Promise<AcquiredPHP>
  • Acquire a PHP instance for processing a request.


    Parameters

    • optionaloptions: { considerPrimary?: boolean }
      • optionalconsiderPrimary: boolean

        Whether the primary instance can be used. Set to false for operations that would corrupt the primary (e.g., CLI commands).

    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>

Page Options