mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@1117 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
7586d9a27d
commit
77a0d87dfc
10 changed files with 69 additions and 29 deletions
|
|
@ -40,11 +40,22 @@
|
|||
|
||||
// 테이블을 찾아서 컬럼의 속성을 구함
|
||||
$table_file = sprintf('./modules/%s/schemas/%s.xml', $module, $table_name);
|
||||
$table_xml = FileHandler::readFile($table_file);
|
||||
$table_obj = parent::parse($table_xml);
|
||||
if($table_obj->table) {
|
||||
foreach($table_obj->table->column as $k => $v) {
|
||||
$buff .= sprintf('$output->column_type["%s"] = "%s";%s', $v->attrs->name, $v->attrs->type, "\n");
|
||||
if(!file_exists($table_file)) {
|
||||
$searched_list = FileHandler::readDir('./modules');
|
||||
$searched_count = count($searched_list);
|
||||
for($i=0;$i<$searched_count;$i++) {
|
||||
$table_file = sprintf('./modules/%s/schemas/%s.xml', $searched_list[$i], $table_name);
|
||||
if(file_exists($table_file)) break;
|
||||
}
|
||||
}
|
||||
|
||||
if(file_exists($table_file)) {
|
||||
$table_xml = FileHandler::readFile($table_file);
|
||||
$table_obj = parent::parse($table_xml);
|
||||
if($table_obj->table) {
|
||||
foreach($table_obj->table->column as $k => $v) {
|
||||
$buff .= sprintf('$output->column_type["%s"] = "%s";%s', $v->attrs->name, $v->attrs->type, "\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue