|
ILIAS
trunk Revision v12.0_alpha-377-g3641b37b9db
|
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...
Inheritance diagram for ActiveRecord:
Collaboration diagram for ActiveRecord:Public Member Functions | |
| getArConnector () | |
| getArFieldList () | |
| getConnectorContainerName () | |
| @description Return the Name of your Connector Table More... | |
| setConnectorContainerName (string $connector_container_name) | |
| getPrimaryFieldValue () | |
| setPrimaryFieldValue ($value) | |
| __construct (mixed $primary_key=0) | |
| storeObjectToCache () | |
| asStdClass () | |
| asArray () | |
| buildFromArray (array $array) | |
| fixDateField ($field_name, string $value) | |
| sleep ($field_name) | |
| wakeUp ($field_name, $field_value) | |
| getArrayForConnector () | |
| installConnector () | |
| store () | |
| save () | |
| create () | |
| copy (int $new_id=0) | |
| afterObjectLoad () | |
| read () | |
| update () | |
| delete () | |
| __call ($name, $arguments) | |
Static Public Member Functions | |
| static | returnDbTableName () |
| static | installDB () |
| static | renameDBField (string $old_name, string $new_name) |
| static | tableExists () |
| static | fieldExists (string $field_name) |
| static | removeDBField (string $field_name) |
| static | updateDB () |
| static | resetDB () |
| static | truncateDB () |
| static | flushDB () |
| @depracated never use in ILIAS Core, Plugins only More... | |
| static | preloadObjects () |
| static | additionalParams (array $additional_params) |
| static | findOrFail ($primary_key, array $add_constructor_args=[]) |
| Tries to find the object and throws an Exception if object is not found, instead of returning null. More... | |
| static | findOrGetInstance ($primary_key, array $add_constructor_args=[]) |
| static | where ($where, $operator=null) |
| static | innerjoinAR (ActiveRecord $activeRecord, $on_this, string $on_external, array $fields=[' *'], string $operator='=', bool $both_external=false) |
| static | innerjoin (string $tablename, $on_this, string $on_external, array $fields=[' *'], string $operator='=', bool $both_external=false) |
| static | leftjoin (string $tablename, $on_this, string $on_external, array $fields=[' *'], string $operator='=', bool $both_external=false) |
| static | orderBy (string $orderBy, string $orderDirection='ASC') |
| static | dateFormat (string $date_format='d.m.Y - H:i:s') |
| static | limit (int $start, int $end) |
| static | affectedRows () |
| static | count () |
| static | get () |
| static | debug () |
| static | first () |
| static | getCollection () |
| static | last () |
| static | getFirstFromLastQuery () |
| static | connector (arConnector $arConnector) |
| static | raw (bool $set_raw=true) |
| static | getArray (?string $key=null, string|array|null $values=null) |
| static | _toCamelCase (string $str, bool $capitalise_first_char=false) |
Protected Member Functions | |
| installDatabase () | |
Static Protected Member Functions | |
| static | getCalledClass () |
| @description Returns an instance of the instatiated calling active record (needs to be done in static methods) @TODO : This should be cached somehow More... | |
| static | fromCamelCase (string $str) |
Protected Attributes | |
| bool | $ar_safe_read = true |
| string | $connector_container_name = '' |
| bool | $is_new = true |
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.
If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning @depracated This service is now deprecated and will be removed with ILIAS 12 or 13 (depending on how quickly users can replace their implementations). The ActiveRecord was a simple way of handling database operations and object mapping in its day. However, the pattern is not very lightweight and has a very large overhead. It also leads to many database queries and high memory consumption. For several releases now, the “Repository Pattern” has been propagated as a better alternative.
Definition at line 27 of file class.ActiveRecord.php.
| ActiveRecord::__construct | ( | mixed | $primary_key = 0 | ) |
Definition at line 96 of file class.ActiveRecord.php.
References arFieldCache\get(), and read().
Here is the call graph for this function:| ActiveRecord::__call | ( | $name, | |
| $arguments | |||
| ) |
| $name | |
| $arguments |
Definition at line 700 of file class.ActiveRecord.php.
|
static |
Definition at line 719 of file class.ActiveRecord.php.
References $c.
|
static |
Definition at line 430 of file class.ActiveRecord.php.
|
static |
Definition at line 607 of file class.ActiveRecord.php.
| ActiveRecord::afterObjectLoad | ( | ) |
Reimplemented in CachedActiveRecord, and ilDclFieldProperty.
Definition at line 376 of file class.ActiveRecord.php.
| ActiveRecord::asArray | ( | ) |
Definition at line 133 of file class.ActiveRecord.php.
Referenced by arConnectorCache\storeActiveRecordInCache().
Here is the caller graph for this function:| ActiveRecord::asStdClass | ( | ) |
Definition at line 119 of file class.ActiveRecord.php.
References getArFieldList().
Referenced by arConnectorSession\create().
Here is the call graph for this function:
Here is the caller graph for this function:| ActiveRecord::buildFromArray | ( | array | $array | ) |
Reimplemented in ilAccessibilityDocument.
Definition at line 144 of file class.ActiveRecord.php.
References arObjectCache\get(), arObjectCache\isCached(), and arObjectCache\store().
Here is the call graph for this function:
|
static |
Definition at line 666 of file class.ActiveRecord.php.
| ActiveRecord::copy | ( | int | $new_id = 0 | ) |
| arException |
Definition at line 365 of file class.ActiveRecord.php.
References arException\COPY_DESTINATION_ID_EXISTS.
|
static |
Definition at line 614 of file class.ActiveRecord.php.
Referenced by ilAccessibilityDocument\detachCriterion(), and ILIAS\UI\Implementation\Component\Table\AbstractTable\getColumnCount().
Here is the caller graph for this function:| ActiveRecord::create | ( | ) |
Reimplemented in ilAccessibilityDocumentCriterionAssignment, CachedActiveRecord, ilADNNotification, ilDclFieldProperty, and ilMMItemStorage.
Definition at line 351 of file class.ActiveRecord.php.
References arFieldCache\getPrimaryFieldName(), and arObjectCache\store().
Referenced by ilDclTableView\cloneStructure(), ilDclTableViewFieldSetting\cloneStructure(), and ilOrgUnitPathStorage\store().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 587 of file class.ActiveRecord.php.
|
static |
Definition at line 629 of file class.ActiveRecord.php.
| ActiveRecord::delete | ( | ) |
Reimplemented in CachedActiveRecord, and ilDclTableView.
Definition at line 408 of file class.ActiveRecord.php.
References arObjectCache\purge().
Here is the call graph for this function:
|
staticfinal |
| $field_name |
Definition at line 263 of file class.ActiveRecord.php.
|
static |
Tries to find the object and throws an Exception if object is not found, instead of returning null.
| $primary_key |
| arException |
Definition at line 472 of file class.ActiveRecord.php.
References arException\RECORD_NOT_FOUND.
Referenced by ilSecurePathDefinitionProcessor\beginTag(), ilBiblLibraryFactory\findById(), ilBiblTranslationFactory\findById(), and ilADNNotificationGUI\getNotificationsFromRequest().
Here is the caller graph for this function:
|
static |
| $primary_key | @description Returns an existing Object with given primary-key or a new Instance with given primary-key set but not yet created |
Reimplemented in ilDclTableView.
Definition at line 487 of file class.ActiveRecord.php.
|
static |
Definition at line 636 of file class.ActiveRecord.php.
Referenced by ilDclTableView\createOrGetStandardView(), ilDclTableViewFieldSetting\getInstance(), and ilDclTableViewFieldSetting\getTableViewFieldSetting().
Here is the caller graph for this function:| ActiveRecord::fixDateField | ( | $field_name, | |
| string | $value | ||
| ) |
| $field_name | |
| $value |
Definition at line 167 of file class.ActiveRecord.php.
|
staticfinal |
@depracated never use in ILIAS Core, Plugins only
Definition at line 326 of file class.ActiveRecord.php.
Referenced by ilMMTopItemGUI\restore().
Here is the caller graph for this function:
|
staticprotected |
Definition at line 728 of file class.ActiveRecord.php.
References $c.
|
static |
Definition at line 622 of file class.ActiveRecord.php.
Referenced by ilBiblLibraryFactory\getAll(), and ilADNNotificationGUI\getNotificationsFromRequest().
Here is the caller graph for this function:| ActiveRecord::getArConnector | ( | ) |
Definition at line 33 of file class.ActiveRecord.php.
References arConnectorMap\get().
Referenced by arWhere\asSQLStatement().
Here is the call graph for this function:
Here is the caller graph for this function:| ActiveRecord::getArFieldList | ( | ) |
Definition at line 38 of file class.ActiveRecord.php.
References arFieldCache\get().
Referenced by arWhere\asSQLStatement(), asStdClass(), CachedActiveRecord\buildHash(), CachedActiveRecord\getCacheIdentifier(), arConnectorDB\installDatabase(), arConnectorDB\updateDatabase(), and arConnectorDB\updateIndices().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
| null | $values |
Definition at line 684 of file class.ActiveRecord.php.
Referenced by ilMMItemInformation\__construct(), ilMMAbstractBaseTypeHandlerAction\__construct(), ILIAS\AdministrativeNotification\DataRetrieval\getRecords(), and ilOrgUnitPathStorage\getTextRepresentationOfOrgUnits().
Here is the caller graph for this function:
|
final |
Definition at line 198 of file class.ActiveRecord.php.
References $data.
Referenced by arConnectorDB\create(), and arConnectorDB\update().
Here is the caller graph for this function:
|
staticprotected |
@description Returns an instance of the instatiated calling active record (needs to be done in static methods) @TODO : This should be cached somehow
Definition at line 221 of file class.ActiveRecord.php.
References arCalledClassCache\get().
Referenced by getConnectorContainerName().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 643 of file class.ActiveRecord.php.
Referenced by ilDclTableViewBaseDefaultValue\findAll(), and ilBiblFieldFactory\getCollectionForFilter().
Here is the caller graph for this function:| ActiveRecord::getConnectorContainerName | ( | ) |
@description Return the Name of your Connector Table
Reimplemented in ilADNDismiss, ilADNNotification, ilBiblLibrary, ilBiblAttribute, ilBiblData, ilBiblEntry, ilBiblField, ilBiblFieldFilter, ilBiblOverviewModel, ilBiblTranslation, and ilOrgUnitPathStorage.
Definition at line 59 of file class.ActiveRecord.php.
References $connector_container_name, and getCalledClass().
Referenced by ActiveRecordList\__construct(), arWhere\asSQLStatement(), arJoin\asStatementText(), arConnectorCache\buildCacheKey(), arConnectorDB\checkFieldExists(), arConnectorDB\checkTableExists(), arConnectorDB\create(), arBuilder\generateDBUpdateForInstallation(), CachedActiveRecord\getCacheIdentifier(), arConnectorDB\installDatabase(), arConnectorDB\nextID(), arConnectorDB\read(), arConnectorDB\removeField(), arConnectorDB\renameField(), arConnectorDB\resetDatabase(), arConnectorDB\truncateDatabase(), arConnectorDB\update(), arConnectorDB\updateDatabase(), and arConnectorDB\updateIndices().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 659 of file class.ActiveRecord.php.
| ActiveRecord::getPrimaryFieldValue | ( | ) |
Definition at line 79 of file class.ActiveRecord.php.
References arFieldCache\getPrimaryFieldName().
Referenced by arConnectorCache\buildCacheKey(), arConnectorSession\create(), CachedActiveRecord\getCacheIdentifier(), arObjectCache\purge(), arConnectorDB\read(), arConnectorSession\read(), arObjectCache\store(), and arConnectorDB\update().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
| $tablename | |
| $on_this | |
| $on_external |
Definition at line 544 of file class.ActiveRecord.php.
|
static |
| $on_this | |
| $on_external |
Definition at line 520 of file class.ActiveRecord.php.
| ActiveRecord::installConnector | ( | ) |
Definition at line 241 of file class.ActiveRecord.php.
|
finalprotected |
Definition at line 279 of file class.ActiveRecord.php.
|
staticfinal |
Definition at line 233 of file class.ActiveRecord.php.
Referenced by arConnectorDB\resetDatabase().
Here is the caller graph for this function:
|
static |
Definition at line 649 of file class.ActiveRecord.php.
|
static |
| $tablename | |
| $on_this | |
| $on_external |
Definition at line 563 of file class.ActiveRecord.php.
|
static |
| $start | |
| $end |
Definition at line 599 of file class.ActiveRecord.php.
|
static |
| $orderBy |
Definition at line 579 of file class.ActiveRecord.php.
Referenced by ilAccessibilityDocumentTableDataProvider\getList(), ilOrgUnitPathStorage\getTextRepresentationOfOrgUnits(), ilDclSelectionOption\getValues(), and ilInitialisation\initAccessibilityControlConcept().
Here is the caller graph for this function:
|
static |
Definition at line 422 of file class.ActiveRecord.php.
References ILIAS\GlobalScreen\get().
Here is the call graph for this function:
|
static |
Definition at line 673 of file class.ActiveRecord.php.
| ActiveRecord::read | ( | ) |
| arException |
Reimplemented in ilAccessibilityDocument, and CachedActiveRecord.
Definition at line 383 of file class.ActiveRecord.php.
References arException\RECORD_NOT_FOUND.
Referenced by __construct().
Here is the caller graph for this function:
|
staticfinal |
Definition at line 271 of file class.ActiveRecord.php.
|
staticfinal |
| $old_name | |
| $new_name |
Definition at line 250 of file class.ActiveRecord.php.
|
staticfinal |
Definition at line 310 of file class.ActiveRecord.php.
|
static |
Reimplemented in ilAccessibilityDocumentCriterionAssignment, ilAccessibilityDocument, ilADNDismiss, ilADNNotification, ILIAS\BackgroundTasks\Implementation\Persistence\BucketContainer, ILIAS\BackgroundTasks\Implementation\Persistence\TaskContainer, ILIAS\BackgroundTasks\Implementation\Persistence\ValueContainer, ILIAS\BackgroundTasks\Implementation\Persistence\ValueToTaskContainer, ilBiblLibrary, ilBiblAttribute, ilBiblData, ilBiblEntry, ilBiblField, ilBiblFieldFilter, ilBiblOverviewModel, ilBiblTranslation, ilDclFieldProperty, ilDclSelectionOption, ilDclTableFieldSetting, ilDclTableView, ilDclTableViewDateDefaultValue, ilDclTableViewFieldSetting, ilDclTableViewNumberDefaultValue, ilDclTableViewTextDefaultValue, ilExAssWikiTeamAR, ilItemGroupAR, and ilWACSecurePath.
Definition at line 48 of file class.ActiveRecord.php.
References arException\UNKNONWN_EXCEPTION.
| ActiveRecord::save | ( | ) |
Definition at line 346 of file class.ActiveRecord.php.
| ActiveRecord::setConnectorContainerName | ( | string | $connector_container_name | ) |
Definition at line 71 of file class.ActiveRecord.php.
References $connector_container_name.
| ActiveRecord::setPrimaryFieldValue | ( | $value | ) |
| $value |
Definition at line 89 of file class.ActiveRecord.php.
References arFieldCache\getPrimaryFieldName().
Here is the call graph for this function:| ActiveRecord::sleep | ( | $field_name | ) |
| $field_name |
Reimplemented in ilDclTableView, and ilDclTableViewFieldSetting.
Definition at line 180 of file class.ActiveRecord.php.
| ActiveRecord::store | ( | ) |
Reimplemented in ilOrgUnitPathStorage.
Definition at line 334 of file class.ActiveRecord.php.
References arFieldCache\getPrimaryFieldName().
Here is the call graph for this function:| ActiveRecord::storeObjectToCache | ( | ) |
Definition at line 114 of file class.ActiveRecord.php.
References arObjectCache\store().
Here is the call graph for this function:
|
staticfinal |
Definition at line 255 of file class.ActiveRecord.php.
|
staticfinal |
Definition at line 318 of file class.ActiveRecord.php.
| ActiveRecord::update | ( | ) |
Reimplemented in ilAccessibilityDocumentCriterionAssignment, CachedActiveRecord, and ilDclFieldProperty.
Definition at line 402 of file class.ActiveRecord.php.
References arObjectCache\store().
Referenced by ilAccessibilityDocumentGUI\detachCriterionAssignment(), and ilOrgUnitPathStorage\store().
Here is the call graph for this function:
Here is the caller graph for this function:
|
staticfinal |
Definition at line 296 of file class.ActiveRecord.php.
| ActiveRecord::wakeUp | ( | $field_name, | |
| $field_value | |||
| ) |
| $field_name | |
| $field_value |
Reimplemented in ilADNNotification, ilDclTableView, and ilDclTableViewFieldSetting.
Definition at line 190 of file class.ActiveRecord.php.
|
static |
| $where | ||
| null | $operator |
Definition at line 507 of file class.ActiveRecord.php.
Referenced by ilDclTableView\createFieldSetting(), ilMMAbstractItemFacade\deleteAssociatedTranslations(), ilBiblEntryFactory\deleteEntryById(), ilBiblFieldFilterFactory\filterItemsForTable(), ilBiblFieldFilterFactory\findByFieldId(), ilBiblFieldFilterFactory\findById(), ilBiblEntryFactory\findByIdAndTypeString(), ilBiblFieldFactory\findOrCreateFieldOfAttribute(), ilBiblEntryFactory\getAllAttributesByEntryId(), ilDclSelectionOption\getAllForField(), ilBiblFieldFilterFactory\getAllForObjectId(), ilDclTableView\getAllForTableId(), ilBiblEntryFactory\getARInstance(), ilBiblFieldFactory\getARInstance(), ilBiblAttributeFactory\getAttributesForEntry(), ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence\getBucketIdsByState(), ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence\getBucketIdsOfUser(), ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence\getBucketMetaOfUser(), ilBiblFieldFilterFactory\getByObjectIdAndField(), ilBiblTranslationFactory\getCollectionOfTranslationsForField(), ilAccessibilityDocumentGUI\getDocumentsByServerRequest(), ilDclCache\getFieldProperties(), ilDclTableView\getFieldSetting(), ilDclTableView\getFieldSettings(), ilDclTableView\getFilterableFieldSettings(), ilBiblDataFactory\getIlBiblDataById(), ilDclTableFieldSetting\getInstance(), ilMMItemRepository\getTopItems(), ilDclBaseFieldModel\getViewSettings(), ilDclTableView\getVisibleFields(), ilADNDismiss\hasDimissed(), ilBiblEntryFactory\loadParsedAttributesByEntryId(), ilDclCache\preloadFieldProperties(), and ilADNNotification\resetForAllUsers().
Here is the caller graph for this function:
|
protected |
Definition at line 29 of file class.ActiveRecord.php.
|
protected |
Definition at line 30 of file class.ActiveRecord.php.
Referenced by getConnectorContainerName(), and setConnectorContainerName().
|
protected |
Definition at line 31 of file class.ActiveRecord.php.