ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Class ActiveRecord. More...
Public Member Functions | |
getArConnector () | |
getArFieldList () | |
getConnectorContainerName () | |
setConnectorContainerName ($connector_container_name) | |
getPrimaryFieldValue () | |
setPrimaryFieldValue ($value) | |
__construct ($primary_key=0, arConnector $connector=null) | |
storeObjectToCache () | |
__getConvertedDateFieldsAsArray ($format=null) | |
__asCsv ($separator=';', $header=false) | |
__asArray () | |
__asStdClass () | |
__asSerializedObject () | |
buildFromArray (array $array) | |
fixDateField ($field_name, $value) | |
sleep ($field_name) | |
wakeUp ($field_name, $field_value) | |
getArrayForDb () | |
getArrayForConnector () | |
installConnector () | |
store () | |
save () | |
create () | |
copy ($new_id=0) | |
afterObjectLoad () | |
read () | |
update () | |
delete () | |
__call ($name, $arguments) | |
Static Public Member Functions | |
static | returnDbTableName () |
static | installDB () |
static | renameDBField ($old_name, $new_name) |
static | tableExists () |
static | fieldExists ($field_name) |
static | removeDBField ($field_name) |
static | updateDB () |
static | resetDB () |
static | truncateDB () |
static | flushDB () |
static | preloadObjects () |
static | additionalParams (array $additional_params) |
static | findOrFail ($primary_key, array $add_constructor_args=array()) |
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=array()) |
static | where ($where, $operator=null) |
static | innerjoinAR (ActiveRecord $ar, $on_this, $on_external, $fields=array(' *'), $operator='=', $both_external=false) |
static | innerjoin ($tablename, $on_this, $on_external, $fields=array(' *'), $operator='=', $both_external=false) |
static | leftjoin ($tablename, $on_this, $on_external, $fields=array(' *'), $operator='=', $both_external=false) |
static | orderBy ($orderBy, $orderDirection='ASC') |
static | dateFormat ($date_format='d.m.Y - H:i:s') |
static | limit ($start, $end) |
static | affectedRows () |
static | count () |
static | get () |
static | debug () |
static | first () |
static | getCollection () |
static | last () |
static | getFirstFromLastQuery () |
static | connector (arConnector $connector) |
static | raw ($set_raw=true) |
static | getArray ($key=null, $values=null) |
static | _toCamelCase ($str, $capitalise_first_char=false) |
Data Fields | |
const | ACTIVE_RECORD_VERSION = '2.0.7' |
Protected Member Functions | |
serializeToCSV ($field) | |
This method is called for every field of your instance if you use __asCsv. More... | |
installDatabase () | |
Static Protected Member Functions | |
static | getCalledClass () |
static | fromCamelCase ($str) |
Protected Attributes | |
$ar_safe_read = true | |
$connector_container_name = '' | |
ActiveRecord::__construct | ( | $primary_key = 0 , |
|
arConnector | $connector = null |
||
) |
int | $primary_key | |
arConnector | $connector |
Definition at line 117 of file class.ActiveRecord.php.
References $key, arFieldCache\get(), and read().
ActiveRecord::__asArray | ( | ) |
Definition at line 211 of file class.ActiveRecord.php.
References getArFieldList().
Referenced by __asCsv().
ActiveRecord::__asCsv | ( | $separator = ';' , |
|
$header = false |
|||
) |
string | $separator | |
bool | $header |
Definition at line 172 of file class.ActiveRecord.php.
References $header, __asArray(), getArFieldList(), and serializeToCSV().
ActiveRecord::__asSerializedObject | ( | ) |
Definition at line 241 of file class.ActiveRecord.php.
ActiveRecord::__asStdClass | ( | ) |
Definition at line 226 of file class.ActiveRecord.php.
References getArFieldList().
Referenced by arConnectorSession\create(), and arConnectorCache\storeActiveRecordInCache().
ActiveRecord::__call | ( | $name, | |
$arguments | |||
) |
$name | |
$arguments |
Definition at line 924 of file class.ActiveRecord.php.
References $name, and count().
ActiveRecord::__getConvertedDateFieldsAsArray | ( | $format = null | ) |
string | $format |
Definition at line 145 of file class.ActiveRecord.php.
References $format, $name, and getArFieldList().
|
static |
string | $str | |
bool | $capitalise_first_char |
Definition at line 946 of file class.ActiveRecord.php.
References $c.
Referenced by arViewField\__construct().
|
static |
array | $additional_params |
Definition at line 595 of file class.ActiveRecord.php.
References arObjectCache\get(), and arObjectCache\isCached().
|
static |
ActiveRecord::afterObjectLoad | ( | ) |
Definition at line 535 of file class.ActiveRecord.php.
Referenced by buildFromArray(), and read().
ActiveRecord::buildFromArray | ( | array | $array | ) |
array | $array |
Definition at line 252 of file class.ActiveRecord.php.
References afterObjectLoad(), arObjectCache\get(), getArFieldList(), arObjectCache\isCached(), arObjectCache\store(), and wakeUp().
|
static |
arConnector | $connector |
Definition at line 881 of file class.ActiveRecord.php.
ActiveRecord::copy | ( | $new_id = 0 | ) |
int | $new_id |
arException |
Definition at line 523 of file class.ActiveRecord.php.
References arException\COPY_DESTINATION_ID_EXISTS, and getArFieldList().
|
static |
Definition at line 803 of file class.ActiveRecord.php.
Referenced by __call(), ilTermsOfServiceDocument\buildFromArray(), ilTermsOfServiceDocument\detachCriterion(), ilStudyProgrammeType\getAllTypesArray(), ilStudyProgrammeType\getAvailableAdvancedMDRecords(), ilStudyProgrammeType\getIconPathByStudyProgrammObjId(), ilOrgUnitPathStorage\getTextRepresentationOfOrgUnits(), ilStudyProgrammeType\getTranslation(), ilStudyProgrammeType\loadTranslation(), ilStudyProgrammeType\processAndStoreIconFile(), read(), and ilOrgUnitPosition\storeAuthorities().
ActiveRecord::create | ( | ) |
Definition at line 505 of file class.ActiveRecord.php.
References getArConnector(), getArFieldList(), getArrayForConnector(), arFieldCache\getPrimaryFieldName(), and arObjectCache\store().
Referenced by ilTermsOfServiceDocument\buildFromArray(), ilDclTableViewFieldSetting\cloneStructure(), ilDclTableView\cloneStructure(), ilStudyProgrammeType\getAllTypesArray(), ilOrgUnitPathStorage\store(), and store().
|
static |
string | $date_format |
Definition at line 765 of file class.ActiveRecord.php.
|
static |
ActiveRecord::delete | ( | ) |
Definition at line 570 of file class.ActiveRecord.php.
References getArConnector(), and arObjectCache\purge().
Referenced by ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence\getValueContainerId(), and arObjectCache\purge().
|
staticfinal |
|
static |
Tries to find the object and throws an Exception if object is not found, instead of returning null.
$primary_key | ||
array | $add_constructor_args |
arException |
Definition at line 645 of file class.ActiveRecord.php.
References arException\RECORD_NOT_FOUND.
Referenced by ilBiblFieldFilterFactory\findById(), ilBiblLibraryFactory\findById(), ilOrgUnitOperationQueries\findById(), ilBiblTranslationFactory\findById(), ilBiblFieldFactory\getType(), ilObjDefReader\handlerBeginTag(), and ilOrgUnitUserAssignmentGUI\index().
|
static |
$primary_key | ||
array | $add_constructor_args | Returns an existing Object with given primary-key or a new Instance with given primary-key set but not yet created |
Definition at line 664 of file class.ActiveRecord.php.
Referenced by ilDclTableViewGUI\executeCommand(), ilOrgUnitPositionFormGUI\fillForm(), and ilOrgUnitPositionGUI\getPositionFromRequest().
|
static |
Definition at line 834 of file class.ActiveRecord.php.
Referenced by ilDclTableView\createOrGetStandardView(), and ilDclTableViewFieldSetting\getInstance().
ActiveRecord::fixDateField | ( | $field_name, | |
$value | |||
) |
$field_name | |
$value |
Definition at line 276 of file class.ActiveRecord.php.
References getArConnector(), and getArFieldList().
|
staticfinal |
Definition at line 478 of file class.ActiveRecord.php.
Referenced by ilMMTopItemGUI\restore().
|
staticprotected |
string | $str |
Definition at line 963 of file class.ActiveRecord.php.
References $c.
|
static |
Definition at line 812 of file class.ActiveRecord.php.
Referenced by ilGSProviderFactory\appendPlugins(), ilBiblLibraryFactory\getAll(), and arConfigFormGUI\getValuesForItem().
ActiveRecord::getArConnector | ( | ) |
Definition at line 40 of file class.ActiveRecord.php.
References arConnectorMap\get().
Referenced by arWhere\asSQLStatement(), create(), delete(), fixDateField(), installDatabase(), read(), and update().
ActiveRecord::getArFieldList | ( | ) |
Definition at line 49 of file class.ActiveRecord.php.
References arFieldCache\get().
Referenced by __asArray(), __asCsv(), __asStdClass(), __getConvertedDateFieldsAsArray(), arWhere\asSQLStatement(), buildFromArray(), CachedActiveRecord\buildHash(), copy(), create(), fixDateField(), getArrayForConnector(), CachedActiveRecord\getCacheIdentifier(), arConnectorDB\installDatabase(), installDatabase(), arStorage\mapFromActiveRecord(), arStorage\mapToActiveRecord(), arConnectorDB\updateDatabase(), and arConnectorDB\updateIndices().
|
static |
null | $key | |
null | $values |
Definition at line 908 of file class.ActiveRecord.php.
Referenced by ilMMAbstractBaseTypeHandlerAction\__construct(), ilMMItemInformation\__construct(), ilOrgUnitPositionTableGUI\buildData(), ilOrgUnitPathStorage\getTextRepresentationOfOrgUnits(), ilOrgUnitAuthorityInputGUI\getValue(), ilOrgUnitUserAssignmentGUI\index(), ilOrgUnitPositionFormGUI\initFormElements(), ilMemcacheServerTableGUI\parseData(), and ilPermissionGUI\savePositionsPermissions().
|
final |
Definition at line 322 of file class.ActiveRecord.php.
References $data, getArFieldList(), and sleep().
Referenced by arConnectorDB\create(), create(), getArrayForDb(), arStorage\mapFromActiveRecord(), arStorage\mapToActiveRecord(), read(), and arConnectorDB\update().
|
final |
Definition at line 313 of file class.ActiveRecord.php.
References getArrayForConnector().
|
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 348 of file class.ActiveRecord.php.
References arCalledClassCache\get().
|
static |
Definition at line 845 of file class.ActiveRecord.php.
Referenced by ilBiblFieldFactory\getCollectionForFilter(), ilTermsOfServiceDocumentGUI\getFirstDocumentFromList(), and arStorageRecordGUI\index().
ActiveRecord::getConnectorContainerName | ( | ) |
Definition at line 69 of file class.ActiveRecord.php.
References $connector_container_name.
Referenced by ActiveRecordList\__construct(), arWhere\asSQLStatement(), arJoin\asStatementText(), arConnectorDB\checkFieldExists(), arConnectorDB\checkTableExists(), arConnectorDB\create(), CachedActiveRecord\getCacheIdentifier(), ActiveRecordList\innerjoinAR(), innerjoinAR(), arConnectorDB\installDatabase(), arConnectorDB\nextID(), arConnectorCache\read(), arConnectorDB\read(), arConnectorDB\removeField(), arConnectorDB\renameField(), arConnectorDB\resetDatabase(), arConnectorCache\storeActiveRecordInCache(), arConnectorDB\truncateDatabase(), arConnectorDB\update(), arConnectorDB\updateDatabase(), and arConnectorDB\updateIndices().
|
static |
ActiveRecord::getPrimaryFieldValue | ( | ) |
Definition at line 94 of file class.ActiveRecord.php.
References arFieldCache\getPrimaryFieldName().
Referenced by arConnectorSession\create(), CachedActiveRecord\getCacheIdentifier(), arObjectCache\purge(), arConnectorCache\read(), arConnectorSession\read(), arConnectorDB\read(), read(), arObjectCache\store(), store(), arConnectorCache\storeActiveRecordInCache(), and arConnectorDB\update().
|
static |
$tablename | ||
$on_this | ||
$on_external | ||
array | $fields | |
string | $operator |
Definition at line 720 of file class.ActiveRecord.php.
Referenced by ilMStListCoursesGUI\getActions().
|
static |
ActiveRecord | $ar | |
$on_this | ||
$on_external | ||
array | $fields | |
string | $operator |
Definition at line 705 of file class.ActiveRecord.php.
References getConnectorContainerName().
ActiveRecord::installConnector | ( | ) |
Definition at line 375 of file class.ActiveRecord.php.
References installDatabase().
|
finalprotected |
Definition at line 427 of file class.ActiveRecord.php.
References getArConnector(), getArFieldList(), and tableExists().
Referenced by installConnector().
|
staticfinal |
$arBuilder = new arBuilder(new ilYourARBasedClass()); $arBuilder->generateDBUpdateForInstallation();
Definition at line 364 of file class.ActiveRecord.php.
Referenced by arConnectorDB\resetDatabase().
|
static |
|
static |
$tablename | ||
$on_this | ||
$on_external | ||
array | $fields | |
string | $operator |
Definition at line 737 of file class.ActiveRecord.php.
|
static |
$start | |
$end |
Definition at line 780 of file class.ActiveRecord.php.
|
static |
$orderBy | ||
string | $orderDirection |
Definition at line 751 of file class.ActiveRecord.php.
Referenced by ilDclTableView\createOrGetStandardView(), ilTermsOfServiceDocumentTableDataProvider\getList(), ilOrgUnitPathStorage\getTextRepresentationOfOrgUnits(), ilDclSelectionOption\getValues(), ilInitialisation\initTermsOfService(), and ilTermsOfServiceDocumentFormGUI\saveObject().
|
static |
Definition at line 584 of file class.ActiveRecord.php.
References ILIAS\GlobalScreen\get().
|
static |
bool | $set_raw |
Definition at line 894 of file class.ActiveRecord.php.
ActiveRecord::read | ( | ) |
arException |
Definition at line 543 of file class.ActiveRecord.php.
References $records, afterObjectLoad(), count(), getArConnector(), getArrayForConnector(), getPrimaryFieldValue(), arException\RECORD_NOT_FOUND, arObjectCache\store(), and wakeUp().
Referenced by __construct().
|
staticfinal |
|
staticfinal |
|
staticfinal |
Definition at line 460 of file class.ActiveRecord.php.
|
static |
Definition at line 59 of file class.ActiveRecord.php.
References arException\UNKNONWN_EXCEPTION.
ActiveRecord::save | ( | ) |
Definition at line 499 of file class.ActiveRecord.php.
References store().
Referenced by ilExAssTypeWikiTeam\cloneSpecificProperties(), and ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence\saveTask().
|
protected |
This method is called for every field of your instance if you use __asCsv.
You can use it to customize your export into csv. (e.g. serialize an array).
$field | string |
Definition at line 202 of file class.ActiveRecord.php.
Referenced by __asCsv().
ActiveRecord::setConnectorContainerName | ( | $connector_container_name | ) |
string | $connector_container_name |
Definition at line 85 of file class.ActiveRecord.php.
References $connector_container_name.
ActiveRecord::setPrimaryFieldValue | ( | $value | ) |
$value |
Definition at line 105 of file class.ActiveRecord.php.
References arFieldCache\getPrimaryFieldName().
ActiveRecord::sleep | ( | $field_name | ) |
$field_name |
Definition at line 291 of file class.ActiveRecord.php.
Referenced by getArrayForConnector().
ActiveRecord::store | ( | ) |
Definition at line 486 of file class.ActiveRecord.php.
References create(), arFieldCache\getPrimaryFieldName(), getPrimaryFieldValue(), and update().
Referenced by save(), and ilTermsOfServiceDocumentTest\testCriteriaCanBeAttachedToAndDetachedFromDocumentPersistently().
ActiveRecord::storeObjectToCache | ( | ) |
Definition at line 134 of file class.ActiveRecord.php.
References arObjectCache\store().
|
staticfinal |
Definition at line 396 of file class.ActiveRecord.php.
Referenced by installDatabase().
|
staticfinal |
Definition at line 469 of file class.ActiveRecord.php.
ActiveRecord::update | ( | ) |
Definition at line 563 of file class.ActiveRecord.php.
References getArConnector(), and arObjectCache\store().
Referenced by ilTermsOfServiceDocument\buildFromArray(), ilStudyProgrammeType\getAllTypesArray(), ilOrgUnitPathStorage\store(), and store().
|
staticfinal |
Definition at line 445 of file class.ActiveRecord.php.
ActiveRecord::wakeUp | ( | $field_name, | |
$field_value | |||
) |
$field_name | |
$field_value |
Definition at line 303 of file class.ActiveRecord.php.
Referenced by buildFromArray(), and read().
|
static |
$where | ||
null | $operator |
Definition at line 687 of file class.ActiveRecord.php.
Referenced by ilStudyProgrammeUserProgress\__construct(), ilMMItemInformation\__construct(), ilOrgUnitPosition\afterObjectLoad(), ilDclTableView\createFieldSetting(), ilObjOrgUnit\delete(), ilMMAbstractItemFacade\deleteAssociatedTranslations(), ilBiblEntryFactory\deleteEntryById(), ilTermsOfServiceDocument\detachCriterion(), ilObjBibliographic\doRead(), ilBiblFieldFilterFactory\filterItemsForTable(), ilBiblFieldFilterFactory\findByFieldId(), ilBiblEntryFactory\findByIdAndTypeString(), ilOrgUnitOperationContextQueries\findByName(), ilOrgUnitOperationQueries\findByOperationString(), ilBiblFieldFactory\findOrCreateFieldOfAttribute(), ilBiblEntryFactory\getAllAttributesByEntryId(), ilBiblEntryFactory\getAllEntries(), ilBiblFieldFilterFactory\getAllForObjectId(), ilStudyProgrammeType\getAllTypesArray(), ilBiblEntryFactory\getARInstance(), ilBiblFieldFactory\getARInstance(), ilStudyProgrammeType\getAssignedAdvancedMDRecords(), ilStudyProgrammeType\getAssignedStudyProgrammes(), ilObjOrgUnitTree\getAssignements(), ilOrgUnitUserAssignmentQueries\getAssignmentOrFail(), ilObjStudyProgramme\getAssignmentsOf(), ilOrgUnitUserAssignmentQueries\getAssignmentsOfUserId(), ilObjStudyProgramme\getAssignmentsRaw(), ilBiblAttributeFactory\getAttributesForEntry(), ilStudyProgrammeType\getAvailableAdvancedMDRecords(), ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence\getBucketIdsByState(), ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence\getBucketIdsOfUser(), ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence\getBucketMetaOfUser(), ilBiblFieldFilterFactory\getByObjectIdAndField(), ilBiblTranslationFactory\getCollectionOfTranslationsForField(), ilOrgUnitPosition\getCorePosition(), ilOrgUnitPosition\getDependentAuthorities(), ilTermsOfServiceDocumentGUI\getDocumentsByServerRequest(), ilBiblEntryFactory\getEntryById(), ilDclCache\getFieldProperties(), ilDclTableView\getFieldSettings(), ilDclBaseFieldModel\getFieldSettings(), ilDclTableView\getFilterableFieldSettings(), ilBiblDataFactory\getIlBiblDataById(), ilStudyProgrammeUserProgressDB\getInstanceForAssignment(), ilStudyProgrammeUserProgressDB\getInstancesForAssignment(), ilStudyProgrammeUserAssignment\getInstancesForProgram(), ilStudyProgrammeUserProgressDB\getInstancesForProgram(), ilStudyProgrammeUserProgressDB\getInstancesForUser(), ilStudyProgrammeUserAssignment\getInstancesOfUser(), ilOrgUnitUserAssignmentQueries\getOrgUnitIdsOfUsersPosition(), ilDclTableHelper\getStandardViewsByVisibleTables(), ilOrgUnitPermissionQueries\getTemplateSetForContextName(), ilMMItemRepository\getTopItems(), ilStudyProgrammeType\getTranslation(), ilStudyProgrammeType\getTranslations(), ilOrgUnitUserAssignmentQueries\getUserAssignmentsOfPosition(), ilOrgUnitUserAssignmentQueries\getUserIdsOfOrgUnit(), ilOrgUnitUserAssignmentQueries\getUserIdsOfOrgUnits(), ilOrgUnitUserAssignmentQueries\getUserIdsOfOrgUnitsInPosition(), ilOrgUnitUserAssignmentQueries\getUserIdsOfOrgUnitsOfUsersPosition(), ilOrgUnitUserAssignmentQueries\getUserIdsOfPosition(), ilOrgUnitUserAssignmentQueries\getUserIdsOfUsersOrgUnitsInPosition(), ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence\getValueContainerId(), ilDclTableView\getVisibleFields(), ilOrgUnitPermissionQueries\hasLocalSet(), ilBiblEntryFactory\loadParsedAttributesByEntryId(), ilStudyProgrammeType\loadTranslation(), ilMMItemTranslationTableGUI\parseData(), ilDclCache\preloadFieldProperties(), ilOrgUnitOperationQueries\registerNewOperationForMultipleContexts(), ilTermsOfServiceSettingsFormGUI\saveObject(), ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence\saveTask(), ilObjTermsOfServiceGUI\showMissingDocuments(), ilOrgUnitPathStorage\store(), and ilOrgUnitPosition\storeAuthorities().
|
protected |
Definition at line 30 of file class.ActiveRecord.php.
|
protected |
Definition at line 34 of file class.ActiveRecord.php.
Referenced by getConnectorContainerName(), and setConnectorContainerName().
const ActiveRecord::ACTIVE_RECORD_VERSION = '2.0.7' |
Definition at line 26 of file class.ActiveRecord.php.