ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
|
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 110 of file class.ActiveRecord.php.
References arFieldCache\get(), read(), and arConnectorMap\register().
ActiveRecord::__asArray | ( | ) |
Definition at line 199 of file class.ActiveRecord.php.
References getArFieldList().
Referenced by __asCsv().
ActiveRecord::__asCsv | ( | $separator = ';' , |
|
$header = false |
|||
) |
string | $separator | |
bool | $header |
Definition at line 162 of file class.ActiveRecord.php.
References $header, __asArray(), getArFieldList(), and serializeToCSV().
ActiveRecord::__asSerializedObject | ( | ) |
Definition at line 227 of file class.ActiveRecord.php.
ActiveRecord::__asStdClass | ( | ) |
Definition at line 213 of file class.ActiveRecord.php.
References getArFieldList().
Referenced by arConnectorSession\create().
ActiveRecord::__call | ( | $name, | |
$arguments | |||
) |
$name | |
$arguments |
Definition at line 862 of file class.ActiveRecord.php.
ActiveRecord::__getConvertedDateFieldsAsArray | ( | $format = null | ) |
string | $format |
Definition at line 136 of file class.ActiveRecord.php.
References date, and getArFieldList().
|
static |
string | $str | |
bool | $capitalise_first_char |
Definition at line 883 of file class.ActiveRecord.php.
Referenced by arViewField\__construct().
|
static |
array | $additional_params |
Definition at line 555 of file class.ActiveRecord.php.
|
static |
Definition at line 741 of file class.ActiveRecord.php.
ActiveRecord::afterObjectLoad | ( | ) |
Reimplemented in ilDclFieldProperty.
Definition at line 501 of file class.ActiveRecord.php.
ActiveRecord::buildFromArray | ( | array | $array | ) |
array | $array |
Definition at line 237 of file class.ActiveRecord.php.
References arObjectCache\get(), arObjectCache\isCached(), and arObjectCache\store().
|
static |
arConnector | $connector |
Definition at line 822 of file class.ActiveRecord.php.
ActiveRecord::copy | ( | $new_id = 0 | ) |
int | $new_id |
arException |
Definition at line 490 of file class.ActiveRecord.php.
References arException\COPY_DESTINATION_ID_EXISTS.
|
static |
Definition at line 751 of file class.ActiveRecord.php.
Referenced by ilStudyProgrammeType\loadTranslation(), and ilStudyProgrammeType\processAndStoreIconFile().
ActiveRecord::create | ( | ) |
Reimplemented in ilDclFieldProperty, and arStorage.
Definition at line 473 of file class.ActiveRecord.php.
References arFieldCache\getPrimaryFieldName(), and arObjectCache\store().
Referenced by ilDclTableView\cloneStructure(), ilDclTableViewFieldSetting\cloneStructure(), and ilOrgUnitPathStorage\store().
|
static |
string | $date_format |
Definition at line 716 of file class.ActiveRecord.php.
|
static |
Definition at line 769 of file class.ActiveRecord.php.
ActiveRecord::delete | ( | ) |
Reimplemented in ilDclTableView.
Definition at line 532 of file class.ActiveRecord.php.
References arObjectCache\purge().
|
staticfinal |
$field_name |
Definition at line 384 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 | ||
array | $add_constructor_args |
arException |
Definition at line 603 of file class.ActiveRecord.php.
References arException\RECORD_NOT_FOUND.
Referenced by ilObjDefReader\handlerBeginTag().
|
static |
$primary_key | ||
array | $add_constructor_args |
@description Returns an existing Object with given primary-key or a new Instance with given primary-key set but not yet created
Definition at line 621 of file class.ActiveRecord.php.
Referenced by ilDclTableViewGUI\executeCommand().
|
static |
Definition at line 779 of file class.ActiveRecord.php.
Referenced by ilDclTableView\createOrGetStandardView(), and ilDclTableViewFieldSetting\getInstance().
ActiveRecord::fixDateField | ( | $field_name, | |
$value | |||
) |
$field_name | |
$value |
Definition at line 263 of file class.ActiveRecord.php.
|
staticfinal |
|
staticprotected |
string | $str |
Definition at line 898 of file class.ActiveRecord.php.
|
static |
Definition at line 759 of file class.ActiveRecord.php.
Referenced by ilBibliographicSetting\getAll(), ilStudyProgrammeType\getAllTypes(), and arConfigFormGUI\getValuesForItem().
ActiveRecord::getArConnector | ( | ) |
Definition at line 40 of file class.ActiveRecord.php.
References arConnectorMap\get().
Referenced by arWhere\asSQLStatement().
ActiveRecord::getArFieldList | ( | ) |
Definition at line 48 of file class.ActiveRecord.php.
References arFieldCache\get().
Referenced by __asArray(), __asCsv(), __asStdClass(), __getConvertedDateFieldsAsArray(), arWhere\asSQLStatement(), arConnectorDB\installDatabase(), arConnectorDB\updateDatabase(), and arConnectorDB\updateIndices().
|
static |
null | $key | |
null | $values |
Definition at line 847 of file class.ActiveRecord.php.
Referenced by ilOrgUnitPathStorage\getTextRepresentationOfOrgUnits(), and ilMemcacheServerTableGUI\parseData().
|
final |
Definition at line 305 of file class.ActiveRecord.php.
References $data.
Referenced by arConnectorDB\create(), and arConnectorDB\update().
|
final |
Definition at line 297 of file class.ActiveRecord.php.
|
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 330 of file class.ActiveRecord.php.
References arCalledClassCache\get().
Referenced by getConnectorContainerName().
|
static |
Definition at line 789 of file class.ActiveRecord.php.
Referenced by arStorageRecordGUI\index().
ActiveRecord::getConnectorContainerName | ( | ) |
Reimplemented in ilBibliographicSetting, ilOrgUnitPathStorage, arMixedKey, and ilADTActiveRecordWrapper.
Definition at line 66 of file class.ActiveRecord.php.
References $connector_container_name, and getCalledClass().
Referenced by arWhere\asSQLStatement(), arJoin\asStatementText(), arConnectorDB\checkFieldExists(), arConnectorDB\checkTableExists(), arConnectorDB\create(), innerjoinAR(), ActiveRecordList\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 810 of file class.ActiveRecord.php.
ActiveRecord::getPrimaryFieldValue | ( | ) |
Reimplemented in ilADTActiveRecordWrapper.
Definition at line 89 of file class.ActiveRecord.php.
References arFieldCache\getPrimaryFieldName().
Referenced by arConnectorSession\create(), arObjectCache\purge(), arConnectorDB\read(), arConnectorSession\read(), arObjectCache\store(), and arConnectorDB\update().
|
static |
$tablename | ||
$on_this | ||
$on_external | ||
array | $fields | |
string | $operator |
Definition at line 674 of file class.ActiveRecord.php.
|
static |
ActiveRecord | $ar | |
$on_this | ||
$on_external | ||
array | $fields | |
string | $operator |
Definition at line 660 of file class.ActiveRecord.php.
References getConnectorContainerName().
ActiveRecord::installConnector | ( | ) |
Definition at line 355 of file class.ActiveRecord.php.
|
finalprotected |
Definition at line 402 of file class.ActiveRecord.php.
|
staticfinal |
$arBuilder = new arBuilder(new ilYourARBasedClass()); $arBuilder->generateDBUpdateForInstallation();
Definition at line 345 of file class.ActiveRecord.php.
Referenced by arConnectorDB\resetDatabase().
|
static |
Definition at line 799 of file class.ActiveRecord.php.
|
static |
$tablename | ||
$on_this | ||
$on_external | ||
array | $fields | |
string | $operator |
Definition at line 690 of file class.ActiveRecord.php.
|
static |
$start | |
$end |
Definition at line 730 of file class.ActiveRecord.php.
References $start.
|
static |
$orderBy | ||
string | $orderDirection |
Definition at line 703 of file class.ActiveRecord.php.
Referenced by ilDclTableView\createOrGetStandardView(), and ilOrgUnitPathStorage\getTextRepresentationOfOrgUnits().
|
static |
Definition at line 545 of file class.ActiveRecord.php.
References Assetic\Cache\get().
|
static |
bool | $set_raw |
Definition at line 834 of file class.ActiveRecord.php.
ActiveRecord::read | ( | ) |
Reimplemented in arStorage.
Definition at line 505 of file class.ActiveRecord.php.
References $records, and arException\RECORD_NOT_FOUND.
Referenced by __construct().
|
staticfinal |
$field_name |
Definition at line 394 of file class.ActiveRecord.php.
|
staticfinal |
$old_name | |
$new_name |
Definition at line 366 of file class.ActiveRecord.php.
|
staticfinal |
|
static |
Reimplemented in ilBibliographicSetting, ilDclFieldProperty, ilDclTableFieldSetting, ilDclTableView, ilDclTableViewFieldSetting, ilItemGroupAR, ilStudyProgramme, ilStudyProgrammeAdvancedMetadataRecord, ilStudyProgrammeAssignment, ilStudyProgrammeProgress, ilStudyProgrammeType, ilStudyProgrammeTypeTranslation, arConfig, arMessage, arUser, arMixedKey, arRealRecord, arStorageRecordStorage, ilADTActiveRecordWrapper, ilMemcacheServer, and ilWACSecurePath.
Definition at line 57 of file class.ActiveRecord.php.
References arException\UNKNONWN_EXCEPTION.
ActiveRecord::save | ( | ) |
Definition at line 468 of file class.ActiveRecord.php.
|
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 191 of file class.ActiveRecord.php.
Referenced by __asCsv().
ActiveRecord::setConnectorContainerName | ( | $connector_container_name | ) |
string | $connector_container_name |
Definition at line 81 of file class.ActiveRecord.php.
References $connector_container_name.
ActiveRecord::setPrimaryFieldValue | ( | $value | ) |
$value |
Definition at line 99 of file class.ActiveRecord.php.
References arFieldCache\getPrimaryFieldName().
ActiveRecord::sleep | ( | $field_name | ) |
$field_name |
Reimplemented in ilDclTableView, ilDclTableViewFieldSetting, and ilADTActiveRecordWrapper.
Definition at line 277 of file class.ActiveRecord.php.
ActiveRecord::store | ( | ) |
Reimplemented in ilOrgUnitPathStorage.
Definition at line 456 of file class.ActiveRecord.php.
References arFieldCache\getPrimaryFieldName().
ActiveRecord::storeObjectToCache | ( | ) |
Definition at line 126 of file class.ActiveRecord.php.
References arObjectCache\store().
|
staticfinal |
|
staticfinal |
ActiveRecord::update | ( | ) |
Reimplemented in ilDclFieldProperty, and arStorage.
Definition at line 526 of file class.ActiveRecord.php.
References arObjectCache\store().
Referenced by ilOrgUnitPathStorage\store().
|
staticfinal |
Definition at line 419 of file class.ActiveRecord.php.
ActiveRecord::wakeUp | ( | $field_name, | |
$field_value | |||
) |
$field_name | |
$field_value |
Reimplemented in ilDclTableView, ilDclTableViewFieldSetting, and ilADTActiveRecordWrapper.
Definition at line 288 of file class.ActiveRecord.php.
|
static |
$where | ||
null | $operator |
Definition at line 643 of file class.ActiveRecord.php.
Referenced by ilStudyProgrammeUserProgress\__construct(), ilDclTableView\createFieldSetting(), ilStudyProgrammeTypeTranslation\deleteAllTranslations(), ilDclTableView\getAllForTableId(), ilStudyProgrammeType\getAssignedAdvancedMDRecords(), ilStudyProgrammeType\getAssignedStudyProgrammes(), ilObjStudyProgramme\getAssignmentsOf(), ilObjStudyProgramme\getAssignmentsRaw(), ilDclTableView\getCountForTableId(), ilDclCache\getFieldProperties(), ilDclBaseFieldModel\getFieldSettings(), ilDclTableView\getFieldSettings(), ilDclTableView\getFilterableFieldSettings(), ilDclTableFieldSetting\getInstance(), ilStudyProgrammeUserProgress\getInstanceForAssignment(), ilStudyProgrammeUserProgress\getInstancesForAssignment(), ilStudyProgrammeUserAssignment\getInstancesForProgram(), ilStudyProgrammeUserProgress\getInstancesForProgram(), ilStudyProgrammeUserProgress\getInstancesForUser(), ilStudyProgrammeUserAssignment\getInstancesOfUser(), ilDclTableHelper\getStandardViewsByVisibleTables(), ilDclTableView\getVisibleFields(), ilStudyProgrammeType\loadTranslation(), and ilDclCache\preloadFieldProperties().
|
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.