2 require_once(dirname(__FILE__) .
'/../class.arFieldList.php');
18 const REGEX =
"/([a-z]*)\\(([0-9]*)\\)/us";
79 $res = self::getDB()->query($sql);
80 while (
$data = self::getDB()->fetchObject(
$res)) {
89 require_once('./Services/ActiveRecord/class.ActiveRecord.php'); 97 class {CLASS_NAME} extends ActiveRecord { 103 static function returnDbTableName() { 104 return '{TABLE_NAME}'; 110 public function getConnectorContainerName() { 111 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\"");
161 if ($field->Null ==
'NO') {
165 if ($field->Key ==
'PRI') {
180 preg_match(self::REGEX, $string, $matches);
182 return self::$field_map[$matches[1]];
193 $field_type = self::lookupFieldType($string);
195 preg_match(self::REGEX, $string, $matches);
197 if (self::$length_map[$field_type][$matches[2]]) {
198 return self::$length_map[$field_type][$matches[2]];
208 public static function getDB()
211 $ilDB = $DIC[
'ilDB'];
262 if (!in_array($structure->Field, $this->ids)) {
264 $this->ids[] = $structure->Field;
__construct($table_name, $class_name)
static lookupFieldLength($string)
returnAttributesForField(stdClass $field)
static lookupFieldType($string)
foreach($_POST as $key=> $value) $res
const FIELD_TYPE_TIMESTAMP
setTableName($table_name)
if(array_key_exists('yes', $_REQUEST)) $attributes
setClassName($class_name)
addStructure(stdClass $structure)