|
ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
ADT based-object base class. More...
Inheritance diagram for ilADTBasedObject:
Collaboration diagram for ilADTBasedObject:Public Member Functions | |
| __construct () | |
| Constructor. More... | |
| getProperties () | |
| Get all properties. More... | |
| isValid () | |
| Validate. More... | |
| __call ($a_method, $a_value) | |
| Get property magic method ("get<PropertyName>()") More... | |
| read () | |
| Read record. More... | |
| create () | |
| Create record (only if valid) More... | |
| update () | |
| Update record (only if valid) More... | |
| delete () | |
| Delete record. More... | |
| getDBErrors () | |
| Get DB errors. More... | |
| translateDBErrorCodes (array $a_codes) | |
| Translate DB error codes. More... | |
| getAllTranslatedErrors ($delimiter="\n") | |
| Get translated error codes (DB, Validation) More... | |
Protected Member Functions | |
| initProperties () | |
| Init properties (aka set ADT definition) More... | |
| parsePrimary (array $a_args) | |
| Parse incoming primary key. More... | |
| hasPrimary () | |
| Check if currently has primary. More... | |
| createPrimaryKey () | |
| Create new primary key, e.g. More... | |
| initDBBridge (ilADTGroupDBBridge $a_adt_db) | |
| Init (properties) DB bridge. More... | |
| initActiveRecordInstance () | |
| Init active record helper for current table, primary and properties. More... | |
Protected Attributes | |
| $properties = array() | |
| $db_errors = array() | |
ADT based-object base class.
Currently "mixed" with ActiveRecord-pattern, could be splitted
Definition at line 13 of file class.ilADTBasedObject.php.
| ilADTBasedObject::__construct | ( | ) |
Constructor.
Tries to read record from DB, in accordance to current ILIAS behaviour
Definition at line 25 of file class.ilADTBasedObject.php.
References initProperties(), parsePrimary(), and read().
Here is the call graph for this function:| ilADTBasedObject::__call | ( | $a_method, | |
| $a_value | |||
| ) |
Get property magic method ("get<PropertyName>()")
Setters are type-specific and cannot be magic
| Exception |
| string | $a_method | |
| mixed | $a_value |
Definition at line 76 of file class.ilADTBasedObject.php.
References $type.
| ilADTBasedObject::create | ( | ) |
Create record (only if valid)
Definition at line 172 of file class.ilADTBasedObject.php.
References createPrimaryKey(), ilADTDBException\getColumn(), hasPrimary(), initActiveRecordInstance(), isValid(), and update().
Referenced by update().
Here is the call graph for this function:
Here is the caller graph for this function:
|
abstractprotected |
| ilADTBasedObject::delete | ( | ) |
Delete record.
Definition at line 222 of file class.ilADTBasedObject.php.
References hasPrimary(), and initActiveRecordInstance().
Here is the call graph for this function:| ilADTBasedObject::getAllTranslatedErrors | ( | $delimiter = "\n" | ) |
Get translated error codes (DB, Validation)
| type | $delimiter |
Definition at line 277 of file class.ilADTBasedObject.php.
References $delimiter, getDBErrors(), getProperties(), and translateDBErrorCodes().
Here is the call graph for this function:| ilADTBasedObject::getDBErrors | ( | ) |
Get DB errors.
Definition at line 237 of file class.ilADTBasedObject.php.
References $db_errors.
Referenced by getAllTranslatedErrors().
Here is the caller graph for this function:| ilADTBasedObject::getProperties | ( | ) |
Get all properties.
Definition at line 51 of file class.ilADTBasedObject.php.
References $properties.
Referenced by getAllTranslatedErrors().
Here is the caller graph for this function:
|
abstractprotected |
|
protected |
Init active record helper for current table, primary and properties.
Definition at line 132 of file class.ilADTBasedObject.php.
References $DIC, $factory, $ilDB, ilADTFactory\getInstance(), hasPrimary(), and initDBBridge().
Referenced by create(), delete(), read(), and update().
Here is the call graph for this function:
Here is the caller graph for this function:
|
abstractprotected |
Init (properties) DB bridge.
| ilADTGroupDBBridge | $a_adt_db |
Reimplemented in ilADTTest.
Referenced by initActiveRecordInstance().
Here is the caller graph for this function:
|
abstractprotected |
Init properties (aka set ADT definition)
Reimplemented in ilADTTest.
Referenced by __construct().
Here is the caller graph for this function:| ilADTBasedObject::isValid | ( | ) |
Validate.
Definition at line 61 of file class.ilADTBasedObject.php.
Referenced by create(), and update().
Here is the caller graph for this function:
|
abstractprotected |
Parse incoming primary key.
| array | $a_args |
Reimplemented in ilADTTest.
Referenced by __construct().
Here is the caller graph for this function:| ilADTBasedObject::read | ( | ) |
Read record.
Definition at line 158 of file class.ilADTBasedObject.php.
References hasPrimary(), and initActiveRecordInstance().
Referenced by __construct().
Here is the call graph for this function:
Here is the caller graph for this function:| ilADTBasedObject::translateDBErrorCodes | ( | array | $a_codes | ) |
Translate DB error codes.
| array | $a_codes |
Definition at line 248 of file class.ilADTBasedObject.php.
References $code, $DIC, $lng, and $res.
Referenced by getAllTranslatedErrors().
Here is the caller graph for this function:| ilADTBasedObject::update | ( | ) |
Update record (only if valid)
Definition at line 198 of file class.ilADTBasedObject.php.
References create(), ilADTDBException\getColumn(), hasPrimary(), initActiveRecordInstance(), and isValid().
Referenced by create().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Definition at line 16 of file class.ilADTBasedObject.php.
Referenced by getDBErrors().
|
protected |
Definition at line 15 of file class.ilADTBasedObject.php.
Referenced by getProperties().