2 require_once(dirname(__FILE__) .
'/../class.arFieldList.php');
18 const REGEX =
"/([a-z]*)\\(([0-9]*)\\)/us";
77 $res = self::getDB()->query($sql);
78 while ($data = self::getDB()->fetchObject(
$res)) {
88 require_once('./Services/ActiveRecord/class.ActiveRecord.php');
96 class {CLASS_NAME} extends ActiveRecord {
102 static function returnDbTableName() {
103 return '{TABLE_NAME}';
109 public function getConnectorContainerName() {
110 return '{TABLE_NAME}';
122 $member .=
' * @con_' . $name .
' ' . $value .
"\n";
126 protected \${FIELD_NAME};
130 $member = str_replace(
'{FIELD_NAME}', $str->field, $member);
131 $member = str_replace(
'{DECLARATION}',
' ', $member);
133 $all_members .= $member;
142 header(
'Content-type: application/x-httpd-php');
143 header(
"Content-Disposition: attachment; filename=\"class." . $this->
getClassName() .
".php\"");
155 $attributes = array();
160 if ($field->null ==
'NO') {
164 if ($field->key ==
'PRI') {
179 preg_match(self::REGEX, $string, $matches);
181 return self::$field_map[$matches[1]];
193 preg_match(self::REGEX, $string, $matches);
195 if (self::$length_map[$field_type][$matches[2]]) {
196 return self::$length_map[$field_type][$matches[2]];
206 public static function getDB() {
253 if(!in_array($structure->field, $this->ids)) {
255 $this->ids[] = $structure->field;