Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. XdebugHandler.php

function XdebugHandler::__construct

Constructor

The $envPrefix is used to create distinct environment variables. It is uppercased and prepended to the default base values. For example 'myapp' would result in MYAPP_ALLOW_XDEBUG and MYAPP_ORIGINAL_INIS.

Parameters

string $envPrefix Value used in environment variables:

Throws

\RuntimeException If the parameter is invalid

File

vendor/composer/xdebug-handler/src/XdebugHandler.php, line 84

Class

XdebugHandler
@author John Stevenson <john-stevenson@blueyonder.co.uk>

Namespace

Composer\XdebugHandler

Code

public function __construct(string $envPrefix) {
    if ($envPrefix === '') {
        throw new \RuntimeException('Invalid constructor parameter');
    }
    self::$name = strtoupper($envPrefix);
    $this->envAllowXdebug = self::$name . self::SUFFIX_ALLOW;
    $this->envOriginalInis = self::$name . self::SUFFIX_INIS;
    self::setXdebugDetails();
    self::$inRestart = false;
    if ($this->cli = PHP_SAPI === 'cli') {
        $this->debug = (string) getenv(self::DEBUG);
    }
    $this->statusWriter = new Status($this->envAllowXdebug, (bool) $this->debug);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal