You are here

function schema_phpprint in Schema 7

Same name and namespace in other branches
  1. 8 schema.module \schema_phpprint()
  2. 5 schema.module \schema_phpprint()
  3. 6 schema.module \schema_phpprint()

Builds a pretty ASCII-formatted version of a $schema array.

This is nothing more than a specialized variation of var_dump and similar functions and is used only as a convenience to generate the PHP for existing database tables (to bootstrap support for modules that previously used CREATE TABLE explicitly) and for debugging.

File

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

Code

function schema_phpprint($schema) {
  $out = '';
  foreach ($schema as $name => $table) {
    $out .= schema_phpprint_table($name, $table);
  }
  return $out;
}