array( {foreach from=$types key=column item=type} '{$column}' => "{$type}", {/foreach} ), {/foreach} ); {rdelim} return $result; {rdelim} static function &indices() {ldelim} static $result = null; if (!$result) {ldelim} $result = array( {foreach from=$indices key=table item=tableIndices} '{$table}' => array( {foreach from=$tableIndices key=name item=info} '{$name}' => array( 'name' => '{$info.name}', 'field' => array( {foreach from=$info.field item=field} '{$field}', {/foreach} ), {if $info.unique}'unique' => 1,{/if} ), {/foreach} ), {/foreach} ); {rdelim} return $result; {rdelim} static function &tables() {ldelim} static $result = null; if (!$result) {ldelim} $result = array_keys(self::columns()); {rdelim} return $result; {rdelim} {rdelim}