63 return $this->properties->isValid();
76 public function __call($a_method, $a_value)
78 $type = substr($a_method, 0, 3);
82 $parsed = strtolower(preg_replace(
"/([A-Z])/",
" $1", substr($a_method, 3)));
83 $parsed = str_replace(
" ",
"_", trim($parsed));
84 if(!$this->properties->hasElement($parsed))
86 throw new Exception(
"ilADTObject unknown property ".$parsed);
88 return $this->properties->getElement($parsed);
91 throw new Exception(
"ilADTObject unknown method ".$parsed);
106 abstract protected function parsePrimary(array $a_args);
140 throw new Exception(
"ilADTBasedObject no primary");
144 $this->adt_db = $factory->getDBBridgeForInstance($this->properties);
148 include_once
"Services/ADT/classes/class.ilADTDBException.php";
149 $ilDB->exception =
"ilADTDBException";
151 return $factory->getActiveRecordInstance($this->adt_db);
192 $this->db_errors[$e->
getColumn()][] = $e->getCode();
222 $this->db_errors[$e->
getColumn()][] = $e->getCode();
235 public function delete()
268 foreach($a_codes as $code)
273 $res[] = $lng->txt(
"adt_error_db_constraint");
277 $res[] =
"Unknown ADT error code ".$code;
295 foreach($this->
getProperties()->getValidationErrorsByElements() as $error_code => $element_id)
297 $tmp[] = $element_id.
" [validation]: ".$this->
getProperties()->translateErrorCode($error_code);
300 foreach($this->
getDBErrors() as $element_id => $codes)
307 return get_class($this).$delimiter.implode($delimiter, $tmp);