ILIAS
trunk Revision v11.0_alpha-1866-gfa368f7776e
|
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...
Public Member Functions | |
getArConnector () | |
getArFieldList () | |
getConnectorContainerName () | |
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 () |
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 () |
Returns an instance of the instatiated calling active record (needs to be done in static methods) : 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 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(), null, and read().
ActiveRecord::__call | ( | $name, | |
$arguments | |||
) |
$name | |
$arguments |
Definition at line 700 of file class.ActiveRecord.php.
|
static |
|
static |
Definition at line 430 of file class.ActiveRecord.php.
References arObjectCache\get(), arObjectCache\isCached(), and null.
|
static |
Definition at line 607 of file class.ActiveRecord.php.
ActiveRecord::afterObjectLoad | ( | ) |
Definition at line 376 of file class.ActiveRecord.php.
ActiveRecord::asArray | ( | ) |
Definition at line 133 of file class.ActiveRecord.php.
References getArFieldList().
Referenced by arConnectorCache\storeActiveRecordInCache().
ActiveRecord::asStdClass | ( | ) |
Definition at line 119 of file class.ActiveRecord.php.
References getArFieldList().
Referenced by arConnectorSession\create().
ActiveRecord::buildFromArray | ( | array | $array | ) |
Definition at line 144 of file class.ActiveRecord.php.
References arObjectCache\get(), getArFieldList(), arObjectCache\isCached(), arObjectCache\store(), and wakeUp().
|
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, and getArFieldList().
|
static |
Definition at line 614 of file class.ActiveRecord.php.
Referenced by __call(), ilAccessibilityDocument\buildFromArray(), ilAccessibilityDocument\detachCriterion(), and ilOrgUnitPathStorage\getTextRepresentationOfOrgUnits().
ActiveRecord::create | ( | ) |
Definition at line 351 of file class.ActiveRecord.php.
References getArConnector(), getArFieldList(), arFieldCache\getPrimaryFieldName(), and arObjectCache\store().
Referenced by ilAccessibilityDocument\buildFromArray(), ilDclTableView\cloneStructure(), ilDclTableViewFieldSetting\cloneStructure(), ilOrgUnitPathStorage\store(), and store().
|
static |
Definition at line 587 of file class.ActiveRecord.php.
|
static |
Definition at line 629 of file class.ActiveRecord.php.
ActiveRecord::delete | ( | ) |
Definition at line 408 of file class.ActiveRecord.php.
References getArConnector(), and arObjectCache\purge().
Referenced by ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence\getValueContainerId().
|
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(), ilADNNotificationGUI\getNotificationsFromRequest(), and ilBiblFieldFactory\getType().
|
static |
$primary_key | Returns an existing Object with given primary-key or a new Instance with given primary-key set but not yet created |
Definition at line 487 of file class.ActiveRecord.php.
References null.
|
static |
Definition at line 636 of file class.ActiveRecord.php.
Referenced by ilDclTableView\createOrGetStandardView(), ilDclTableFieldSetting\getInstance(), ilDclTableViewFieldSetting\getInstance(), and ilDclTableViewFieldSetting\getTableViewFieldSetting().
ActiveRecord::fixDateField | ( | $field_name, | |
string | $value | ||
) |
$field_name | |
$value |
Definition at line 167 of file class.ActiveRecord.php.
References getArConnector(), and getArFieldList().
|
staticfinal |
never use in ILIAS Core, Plugins only
Definition at line 326 of file class.ActiveRecord.php.
Referenced by ilMMTopItemGUI\restore().
|
staticprotected |
|
static |
Definition at line 622 of file class.ActiveRecord.php.
Referenced by ilBiblLibraryFactory\getAll(), ILIAS\GlobalScreen\ADNProvider\getNotifications(), and ilADNNotificationGUI\getNotificationsFromRequest().
ActiveRecord::getArConnector | ( | ) |
Definition at line 33 of file class.ActiveRecord.php.
References arConnectorMap\get().
Referenced by arWhere\asSQLStatement(), create(), delete(), fixDateField(), installDatabase(), read(), and update().
ActiveRecord::getArFieldList | ( | ) |
Definition at line 38 of file class.ActiveRecord.php.
References arFieldCache\get().
Referenced by asArray(), arWhere\asSQLStatement(), asStdClass(), buildFromArray(), CachedActiveRecord\buildHash(), copy(), create(), fixDateField(), getArrayForConnector(), CachedActiveRecord\getCacheIdentifier(), arConnectorDB\installDatabase(), installDatabase(), arConnectorDB\updateDatabase(), and arConnectorDB\updateIndices().
null | $values |
Definition at line 684 of file class.ActiveRecord.php.
Referenced by ilMMAbstractBaseTypeHandlerAction\__construct(), ilMMItemInformation\__construct(), ILIAS\AdministrativeNotification\DataRetrieval\getRecords(), ilOrgUnitPathStorage\getTextRepresentationOfOrgUnits(), and ILIAS\AdministrativeNotification\DataRetrieval\getTotalRowCount().
|
final |
Definition at line 198 of file class.ActiveRecord.php.
References $data, getArFieldList(), and sleep().
Referenced by arConnectorDB\create(), read(), and arConnectorDB\update().
|
staticprotected |
Returns an instance of the instatiated calling active record (needs to be done in static methods) : This should be cached somehow
Definition at line 221 of file class.ActiveRecord.php.
References arCalledClassCache\get().
|
static |
Definition at line 643 of file class.ActiveRecord.php.
Referenced by ilDclTableViewBaseDefaultValue\findAll(), and ilBiblFieldFactory\getCollectionForFilter().
ActiveRecord::getConnectorContainerName | ( | ) |
Return the Name of your Connector Table
Definition at line 59 of file class.ActiveRecord.php.
References $connector_container_name.
Referenced by ActiveRecordList\__construct(), arWhere\asSQLStatement(), arJoin\asStatementText(), arConnectorCache\buildCacheKey(), arConnectorDB\checkFieldExists(), arConnectorDB\checkTableExists(), arConnectorDB\create(), arBuilder\generateDBUpdateForInstallation(), CachedActiveRecord\getCacheIdentifier(), ActiveRecordList\innerjoinAR(), innerjoinAR(), arConnectorDB\installDatabase(), arConnectorDB\nextID(), arConnectorDB\read(), arConnectorDB\removeField(), arConnectorDB\renameField(), arConnectorDB\resetDatabase(), arConnectorDB\truncateDatabase(), arConnectorDB\update(), arConnectorDB\updateDatabase(), and arConnectorDB\updateIndices().
|
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(), arConnectorSession\read(), arConnectorDB\read(), read(), arObjectCache\store(), store(), and arConnectorDB\update().
|
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.
References getConnectorContainerName().
ActiveRecord::installConnector | ( | ) |
Definition at line 241 of file class.ActiveRecord.php.
References installDatabase().
|
finalprotected |
Definition at line 279 of file class.ActiveRecord.php.
References getArConnector(), and getArFieldList().
Referenced by installConnector().
|
staticfinal |
Please generate the manual installation script by using: $arBuilder = new arBuilder(new ilYourARBasedClass()); $arBuilder->generateDBUpdateForInstallation();
Definition at line 233 of file class.ActiveRecord.php.
Referenced by arConnectorDB\resetDatabase().
|
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 ilDclTableView\createOrGetStandardView(), ilAccessibilityDocumentTableDataProvider\getList(), ilOrgUnitPathStorage\getTextRepresentationOfOrgUnits(), ilDclSelectionOption\getValues(), ilInitialisation\initAccessibilityControlConcept(), and ilAccessibilityDocumentFormGUI\saveObject().
|
static |
Definition at line 422 of file class.ActiveRecord.php.
References ILIAS\GlobalScreen\get().
|
static |
Definition at line 673 of file class.ActiveRecord.php.
ActiveRecord::read | ( | ) |
arException |
Definition at line 383 of file class.ActiveRecord.php.
References getArConnector(), getArrayForConnector(), getPrimaryFieldValue(), null, arException\RECORD_NOT_FOUND, arObjectCache\store(), and wakeUp().
Referenced by __construct().
|
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 |
Definition at line 48 of file class.ActiveRecord.php.
References arException\UNKNONWN_EXCEPTION.
ActiveRecord::save | ( | ) |
Definition at line 346 of file class.ActiveRecord.php.
References store().
Referenced by ilExAssTypeWikiTeam\cloneSpecificProperties(), and ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence\saveTask().
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().
ActiveRecord::sleep | ( | $field_name | ) |
$field_name |
Definition at line 180 of file class.ActiveRecord.php.
References null.
Referenced by getArrayForConnector(), and ilADNNotification\wakeUp().
ActiveRecord::store | ( | ) |
Definition at line 334 of file class.ActiveRecord.php.
References create(), arFieldCache\getPrimaryFieldName(), getPrimaryFieldValue(), and update().
Referenced by save().
ActiveRecord::storeObjectToCache | ( | ) |
Definition at line 114 of file class.ActiveRecord.php.
References arObjectCache\store().
|
staticfinal |
Definition at line 255 of file class.ActiveRecord.php.
|
staticfinal |
Definition at line 318 of file class.ActiveRecord.php.
ActiveRecord::update | ( | ) |
Definition at line 402 of file class.ActiveRecord.php.
References getArConnector(), and arObjectCache\store().
Referenced by ilAccessibilityDocument\buildFromArray(), ilOrgUnitPathStorage\store(), and store().
|
staticfinal |
Definition at line 296 of file class.ActiveRecord.php.
ActiveRecord::wakeUp | ( | $field_name, | |
$field_value | |||
) |
$field_name | |
$field_value |
Definition at line 190 of file class.ActiveRecord.php.
References null.
Referenced by buildFromArray(), and read().
|
static |
$where | ||
null | $operator |
Definition at line 507 of file class.ActiveRecord.php.
Referenced by ILIAS\MainMenu\Provider\CustomMainBarProvider\__construct(), ilDclTableView\createFieldSetting(), ilMMAbstractItemFacade\deleteAssociatedTranslations(), ilBiblEntryFactory\deleteEntryById(), ilAccessibilityDocument\detachCriterion(), ilObjBibliographic\doCreate(), ilBiblFieldFilterFactory\filterItemsForTable(), ilBiblFieldFilterFactory\findByFieldId(), ilBiblFieldFilterFactory\findById(), ilBiblEntryFactory\findByIdAndTypeString(), ilBiblFieldFactory\findOrCreateFieldOfAttribute(), ilBiblEntryFactory\getAllAttributesByEntryId(), ilBiblFieldFilterFactory\getAllForObjectId(), 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(), ilBiblEntryTableGUI\getRecordsOfCurrentPage(), ilMMItemRepository\getTopItems(), ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence\getValueContainerId(), ilDclBaseFieldModel\getViewSettings(), ilDclTableView\getVisibleFields(), ilBiblEntryFactory\loadParsedAttributesByEntryId(), ilMMItemTranslationTableGUI\parseData(), ilDclCache\preloadFieldProperties(), ilADNNotification\resetForAllUsers(), ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence\saveTask(), and ilOrgUnitPathStorage\store().
|
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.