37 $this->queryTag =
new QueryTag($query, $isSubQuery);
53 $column_type = array();
56 $id_args = explode(
'.', $query_id);
57 if(count($id_args) == 2)
60 $module = $id_args[0];
63 else if(count($id_args) == 3)
65 $target = $id_args[0];
66 $targetList = array(
'modules' => 1,
'addons' => 1,
'widgets' => 1);
67 if(!isset($targetList[$target]))
71 $module = $id_args[1];
76 $table_file = sprintf(
'%s%s/%s/schemas/%s.xml',
_XE_PATH_,
'modules', $module, $table_name);
77 if(!file_exists($table_file))
80 $searched_count = count($searched_list);
81 for($i = 0; $i < $searched_count; $i++)
83 $table_file = sprintf(
'%s%s/%s/schemas/%s.xml',
_XE_PATH_,
'modules', $searched_list[$i], $table_name);
84 if(file_exists($table_file))
91 if(file_exists($table_file))
95 $table_obj = $xml_parser->parse($table_xml);
98 if(isset($table_obj->table->column) && !is_array($table_obj->table->column))
100 $table_obj->table->column = array($table_obj->table->column);
103 foreach($table_obj->table->column as $k => $v)
105 $column_type[$v->attrs->name] = $v->attrs->type;
120 return "<?php if(!defined('__XE__')) exit();\n"
121 . $this->queryTag->toString()
122 .
'return $query; ?>';
getTableInfo($query_id, $table_name)
__construct($query=NULL, $isSubQuery=FALSE)
readDir($path, $filter= '', $to_lower=FALSE, $concat_prefix=FALSE)