ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
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 array, and 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(), array, 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().
ActiveRecord::__call | ( | $name, | |
$arguments | |||
) |
$name | |
$arguments |
Definition at line 930 of file class.ActiveRecord.php.
References $name, array, and count().
ActiveRecord::__getConvertedDateFieldsAsArray | ( | $format = null | ) |
string | $format |
Definition at line 145 of file class.ActiveRecord.php.
References $format, $name, array, date, and getArFieldList().
|
static |
string | $str | |
bool | $capitalise_first_char |
Definition at line 952 of file class.ActiveRecord.php.
Referenced by arViewField\__construct().
|
static |
array | $additional_params |
Definition at line 601 of file class.ActiveRecord.php.
References array, arObjectCache\get(), and arObjectCache\isCached().
|
static |
ActiveRecord::afterObjectLoad | ( | ) |
Definition at line 538 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 887 of file class.ActiveRecord.php.
ActiveRecord::copy | ( | $new_id = 0 | ) |
int | $new_id |
arException |
Definition at line 526 of file class.ActiveRecord.php.
References array, arException\COPY_DESTINATION_ID_EXISTS, and getArFieldList().
|
static |
Definition at line 809 of file class.ActiveRecord.php.
Referenced by __call(), ilStudyProgrammeType\getAllTypesArray(), ilStudyProgrammeType\getAvailableAdvancedMDRecords(), ilStudyProgrammeType\getIconPathByStudyProgrammObjId(), ilOrgUnitPathStorage\getTextRepresentationOfOrgUnits(), ilStudyProgrammeType\getTranslation(), ilStudyProgrammeType\loadTranslation(), ilStudyProgrammeType\processAndStoreIconFile(), read(), and ilOrgUnitPosition\storeAuthorities().
ActiveRecord::create | ( | ) |
Definition at line 508 of file class.ActiveRecord.php.
References getArConnector(), getArFieldList(), getArrayForConnector(), arFieldCache\getPrimaryFieldName(), and arObjectCache\store().
Referenced by ilDclTableViewFieldSetting\cloneStructure(), ilDclTableView\cloneStructure(), ilStudyProgrammeType\getAllTypesArray(), ilOrgUnitPathStorage\store(), and store().
|
static |
string | $date_format |
Definition at line 771 of file class.ActiveRecord.php.
|
static |
ActiveRecord::delete | ( | ) |
Definition at line 576 of file class.ActiveRecord.php.
References getArConnector(), and arObjectCache\purge().
Referenced by ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence\getValueContainerId().
|
staticfinal |
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 651 of file class.ActiveRecord.php.
References arException\RECORD_NOT_FOUND.
Referenced by ilOrgUnitOperationQueries\findById(), 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 670 of file class.ActiveRecord.php.
Referenced by ilDclTableViewGUI\executeCommand(), ilOrgUnitPositionFormGUI\fillForm(), and ilOrgUnitPositionGUI\getPositionFromRequest().
|
static |
Definition at line 840 of file class.ActiveRecord.php.
Referenced by ilDclTableView\createOrGetStandardView(), and ilDclTableViewFieldSetting\getInstance().
ActiveRecord::fixDateField | ( | $field_name, | |
$value | |||
) |
$field_name | |
$value |
Definition at line 279 of file class.ActiveRecord.php.
References getArConnector(), and getArFieldList().
|
staticfinal |
Definition at line 481 of file class.ActiveRecord.php.
|
staticprotected |
|
static |
Definition at line 818 of file class.ActiveRecord.php.
Referenced by 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(), copy(), create(), fixDateField(), getArrayForConnector(), arConnectorDB\installDatabase(), installDatabase(), arStorage\mapFromActiveRecord(), arStorage\mapToActiveRecord(), arConnectorDB\updateDatabase(), and arConnectorDB\updateIndices().
|
static |
null | $key | |
null | $values |
Definition at line 914 of file class.ActiveRecord.php.
References $key.
Referenced by ilOrgUnitPositionTableGUI\buildData(), ilOrgUnitPathStorage\getTextRepresentationOfOrgUnits(), ilOrgUnitAuthorityInputGUI\getValue(), ilOrgUnitUserAssignmentGUI\index(), ilOrgUnitPositionFormGUI\initFormElements(), ilMemcacheServerTableGUI\parseData(), and ilPermissionGUI\savePositionsPermissions().
|
final |
Definition at line 325 of file class.ActiveRecord.php.
References $data, array, getArFieldList(), and sleep().
Referenced by arConnectorDB\create(), create(), getArrayForDb(), arStorage\mapFromActiveRecord(), arStorage\mapToActiveRecord(), read(), and arConnectorDB\update().
|
final |
Definition at line 316 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 351 of file class.ActiveRecord.php.
References arCalledClassCache\get().
|
static |
Definition at line 851 of file class.ActiveRecord.php.
Referenced by 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(), 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 |
ActiveRecord::getPrimaryFieldValue | ( | ) |
Definition at line 94 of file class.ActiveRecord.php.
References arFieldCache\getPrimaryFieldName().
Referenced by arConnectorSession\create(), arObjectCache\purge(), arConnectorSession\read(), arConnectorDB\read(), read(), arObjectCache\store(), store(), and arConnectorDB\update().
|
static |
$tablename | ||
$on_this | ||
$on_external | ||
array | $fields | |
string | $operator |
Definition at line 726 of file class.ActiveRecord.php.
Referenced by ilMStListCoursesGUI\getActions().
|
static |
ActiveRecord | $ar | |
$on_this | ||
$on_external | ||
array | $fields | |
string | $operator |
Definition at line 711 of file class.ActiveRecord.php.
References getConnectorContainerName().
ActiveRecord::installConnector | ( | ) |
Definition at line 378 of file class.ActiveRecord.php.
References installDatabase().
|
finalprotected |
Definition at line 430 of file class.ActiveRecord.php.
References array, getArConnector(), getArFieldList(), and tableExists().
Referenced by installConnector().
|
staticfinal |
$arBuilder = new arBuilder(new ilYourARBasedClass()); $arBuilder->generateDBUpdateForInstallation();
Definition at line 367 of file class.ActiveRecord.php.
Referenced by arConnectorDB\resetDatabase().
|
static |
|
static |
$tablename | ||
$on_this | ||
$on_external | ||
array | $fields | |
string | $operator |
Definition at line 743 of file class.ActiveRecord.php.
|
static |
$start | |
$end |
Definition at line 786 of file class.ActiveRecord.php.
References $end.
|
static |
$orderBy | ||
string | $orderDirection |
Definition at line 757 of file class.ActiveRecord.php.
Referenced by ilDclTableView\createOrGetStandardView(), ilOrgUnitPathStorage\getTextRepresentationOfOrgUnits(), and ilDclSelectionOption\getValues().
|
static |
Definition at line 590 of file class.ActiveRecord.php.
|
static |
bool | $set_raw |
Definition at line 900 of file class.ActiveRecord.php.
ActiveRecord::read | ( | ) |
arException |
Definition at line 546 of file class.ActiveRecord.php.
References $records, afterObjectLoad(), array, count(), getArConnector(), getArrayForConnector(), getPrimaryFieldValue(), arException\RECORD_NOT_FOUND, arObjectCache\store(), and wakeUp().
Referenced by __construct().
|
staticfinal |
|
staticfinal |
|
staticfinal |
Definition at line 463 of file class.ActiveRecord.php.
|
static |
Definition at line 59 of file class.ActiveRecord.php.
References arException\UNKNONWN_EXCEPTION.
ActiveRecord::save | ( | ) |
Definition at line 502 of file class.ActiveRecord.php.
References store().
Referenced by 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 294 of file class.ActiveRecord.php.
Referenced by getArrayForConnector().
ActiveRecord::store | ( | ) |
Definition at line 489 of file class.ActiveRecord.php.
References array, create(), arFieldCache\getPrimaryFieldName(), getPrimaryFieldValue(), and update().
Referenced by save().
ActiveRecord::storeObjectToCache | ( | ) |
Definition at line 134 of file class.ActiveRecord.php.
References arObjectCache\store().
|
staticfinal |
Definition at line 399 of file class.ActiveRecord.php.
Referenced by installDatabase().
|
staticfinal |
Definition at line 472 of file class.ActiveRecord.php.
ActiveRecord::update | ( | ) |
Definition at line 569 of file class.ActiveRecord.php.
References getArConnector(), and arObjectCache\store().
Referenced by ilStudyProgrammeType\getAllTypesArray(), ilOrgUnitPathStorage\store(), and store().
|
staticfinal |
Definition at line 448 of file class.ActiveRecord.php.
ActiveRecord::wakeUp | ( | $field_name, | |
$field_value | |||
) |
$field_name | |
$field_value |
Definition at line 306 of file class.ActiveRecord.php.
Referenced by buildFromArray(), and read().
|
static |
$where | ||
null | $operator |
Definition at line 693 of file class.ActiveRecord.php.
Referenced by ilStudyProgrammeUserProgress\__construct(), ilOrgUnitPosition\afterObjectLoad(), ilDclTableView\createFieldSetting(), ilObjOrgUnit\delete(), ilOrgUnitOperationContextQueries\findByName(), ilOrgUnitOperationQueries\findByOperationString(), ilStudyProgrammeType\getAllTypesArray(), ilStudyProgrammeType\getAssignedAdvancedMDRecords(), ilStudyProgrammeType\getAssignedStudyProgrammes(), ilObjOrgUnitTree\getAssignements(), ilOrgUnitUserAssignmentQueries\getAssignmentOrFail(), ilObjStudyProgramme\getAssignmentsOf(), ilOrgUnitUserAssignmentQueries\getAssignmentsOfUserId(), ilObjStudyProgramme\getAssignmentsRaw(), ilStudyProgrammeType\getAvailableAdvancedMDRecords(), ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence\getBucketIdsByState(), ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence\getBucketIdsOfUser(), ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence\getBucketMetaOfUser(), ilOrgUnitPosition\getCorePosition(), ilOrgUnitPosition\getDependentAuthorities(), ilDclCache\getFieldProperties(), ilDclTableView\getFieldSettings(), ilDclBaseFieldModel\getFieldSettings(), ilDclTableView\getFilterableFieldSettings(), ilStudyProgrammeUserProgressDB\getInstanceForAssignment(), ilStudyProgrammeUserProgressDB\getInstancesForAssignment(), ilStudyProgrammeUserAssignment\getInstancesForProgram(), ilStudyProgrammeUserProgressDB\getInstancesForProgram(), ilStudyProgrammeUserProgressDB\getInstancesForUser(), ilStudyProgrammeUserAssignment\getInstancesOfUser(), ilOrgUnitUserAssignmentQueries\getOrgUnitIdsOfUsersPosition(), ilDclTableHelper\getStandardViewsByVisibleTables(), ilOrgUnitPermissionQueries\getTemplateSetForContextName(), 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(), ilStudyProgrammeType\loadTranslation(), ilDclCache\preloadFieldProperties(), ilOrgUnitOperationQueries\registerNewOperationForMultipleContexts(), ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence\saveTask(), 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.