You are here

function schema_phpprint_key in Schema 7

Same name and namespace in other branches
  1. 8 schema.module \schema_phpprint_key()
  2. 5 schema.module \schema_phpprint_key()
  3. 6 schema.module \schema_phpprint_key()
2 calls to schema_phpprint_key()
schema_compare_table in ./schema.module
Compares a reference specification (such as one returned by a module's hook_schema) to an inspected specification from the database.
schema_phpprint_table in ./schema.module

File

./schema.module, line 293
The Schema module provides functionality built on the Schema API.

Code

function schema_phpprint_key($keys) {
  $ret = array();
  foreach ($keys as $key) {
    if (is_array($key)) {
      $ret[] = "array('{$key[0]}', {$key[1]})";
    }
    else {
      $ret[] = "'{$key}'";
    }
  }
  return "array(" . implode(", ", $ret) . ")";
}