You are here

public static function Utility::isRunningInCli in Search API 8

Determines whether this PHP process is running on the command line.

Return value

bool TRUE if this PHP process is running via CLI, FALSE otherwise.

19 calls to Utility::isRunningInCli()
AjaxTest::setUp in tests/src/FunctionalJavascript/AjaxTest.php
AutocompleteTest::setUp in modules/search_api_db/tests/src/Kernel/AutocompleteTest.php
BackendTestBase::setUp in tests/src/Kernel/BackendTestBase.php
BasicTrackerTest::setUp in tests/src/Kernel/BasicTrackerTest.php
CliTest::setUp in tests/src/Kernel/System/CliTest.php

... See full list

File

src/Utility/Utility.php, line 220

Class

Utility
Contains utility methods for the Search API.

Namespace

Drupal\search_api\Utility

Code

public static function isRunningInCli() {
  return php_sapi_name() === 'cli';
}