You are here

function patterns_phpparser_dump in Patterns 7

Same name and namespace in other branches
  1. 7.2 patterns_phpparser/patterns_phpparser.module \patterns_phpparser_dump()

Converts an array representing a pattern into a PHP string.

Parameters

array $pattern The pattern to convert into a PHP string:

File

patterns_phpparser/patterns_phpparser.module, line 78

Code

function patterns_phpparser_dump($pattern = NULL, $append = NULL) {
  if (is_null($pattern) || !is_array($pattern)) {
    return FALSE;
  }
  $dump = serialize($pattern);
  return empty($append) ? $dump : $append . "\n" . $dump;
}