You are here

function patterns_utils_is_cli in Patterns 7

Same name and namespace in other branches
  1. 7.2 includes/utils.inc \patterns_utils_is_cli()

Returns TRUE if patterns is executed via cli

Useful for detecting if patterns is running via drush

Return value

Boolean TRUE, if the script is executed in cli

2 calls to patterns_utils_is_cli()
patterns_export_to_file in patterns_export/finalize.inc
Exports a pattern as a donwlodable text file
patterns_export_to_zip in patterns_export/finalize.inc
Exports patterns as a donwlodable Zip archive

File

includes/utils.inc, line 252
Collectiion of general purpose functions.

Code

function patterns_utils_is_cli() {
  return php_sapi_name() == "cli";
}