You are here

function drush_patterns_quickrun in Patterns 7

Same name and namespace in other branches
  1. 7.2 patterns.drush.inc \drush_patterns_quickrun()

Runs a pattern file without importing it into the database

Parameters

string $file The path to the pattern file:

string $format Optional. The format of the pattern.:

string $mode Optional. batch or php. Defaults php.:

array $params:

1 string reference to 'drush_patterns_quickrun'
patterns_drush_command in ./patterns.drush.inc
Implements hook_drush_command().

File

./patterns.drush.inc, line 356
Drush Patterns module commands

Code

function drush_patterns_quickrun($file, $format = PATTERNS_FORMAT_UNKNOWN, $mode = 'php', $params = array()) {
  drush_print(dt('Patterns quick-run.'));
  $format = patterns_drush_get_file_format($file, $format);
  if (!$format) {
    return drush_set_error('Invalid pattern format. Aborting');
  }
  drush_print(dt('Format: ' . $format));
  return patterns_load_file_and_start_engine($file, $format, $mode, $params);
}