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') {
181 preg_match(self::REGEX, $string, $matches);
183 return self::$field_map[$matches[1]];
194 $field_type = self::lookupFieldType($string);
196 preg_match(self::REGEX, $string, $matches);
198 if (self::$length_map[$field_type][$matches[2]]) {
199 return self::$length_map[$field_type][$matches[2]];
209 public static function getDB()
212 $ilDB = $DIC[
'ilDB'];
263 if (!in_array($structure->field, $this->ids)) {
265 $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)
Add a drawing to the header
Create styles array
The data for the language used.
setClassName($class_name)
addStructure(stdClass $structure)