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

Breadcrumb

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

function EventDispatcher::getPhpExecCommand

1 call to EventDispatcher::getPhpExecCommand()
EventDispatcher::doDispatch in vendor/composer/composer/src/Composer/EventDispatcher/EventDispatcher.php
Triggers the listeners of an event.

File

vendor/composer/composer/src/Composer/EventDispatcher/EventDispatcher.php, line 462

Class

EventDispatcher
The Event Dispatcher.

Namespace

Composer\EventDispatcher

Code

protected function getPhpExecCommand() : string {
    $finder = new PhpExecutableFinder();
    $phpPath = $finder->find(false);
    if (!$phpPath) {
        throw new \RuntimeException('Failed to locate PHP binary to execute ' . $phpPath);
    }
    $phpArgs = $finder->findArguments();
    $phpArgs = $phpArgs ? ' ' . implode(' ', $phpArgs) : '';
    $allowUrlFOpenFlag = ' -d allow_url_fopen=' . ProcessExecutor::escape(ini_get('allow_url_fopen'));
    $disableFunctionsFlag = ' -d disable_functions=' . ProcessExecutor::escape(ini_get('disable_functions'));
    $memoryLimitFlag = ' -d memory_limit=' . ProcessExecutor::escape(ini_get('memory_limit'));
    return ProcessExecutor::escape($phpPath) . $phpArgs . $allowUrlFOpenFlag . $disableFunctionsFlag . $memoryLimitFlag;
}

API Navigation

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