ILIAS
release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
|
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) | |
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 118 of file class.ActiveRecord.php.
References arFieldCache\get(), read(), and arConnectorMap\register().
ActiveRecord::__asArray | ( | ) |
Definition at line 208 of file class.ActiveRecord.php.
References getArFieldList().
Referenced by __asCsv().
ActiveRecord::__asCsv | ( | $separator = ';' , |
|
$header = false |
|||
) |
string | $separator | |
bool | $header |
Definition at line 171 of file class.ActiveRecord.php.
References $header, $separator, __asArray(), getArFieldList(), and serializeToCSV().
ActiveRecord::__asSerializedObject | ( | ) |
Definition at line 236 of file class.ActiveRecord.php.
ActiveRecord::__asStdClass | ( | ) |
Definition at line 222 of file class.ActiveRecord.php.
References getArFieldList().
Referenced by arConnectorSession\create().
ActiveRecord::__call | ( | $name, | |
$arguments | |||
) |
$name | |
$arguments |
Definition at line 855 of file class.ActiveRecord.php.
ActiveRecord::__getConvertedDateFieldsAsArray | ( | $format = NULL | ) |
string | $format |
Definition at line 145 of file class.ActiveRecord.php.
References getArFieldList().
|
static |
string | $str | |
bool | $capitalise_first_char |
Definition at line 876 of file class.ActiveRecord.php.
Referenced by arViewField\__construct().
|
static |
array | $additional_params |
Definition at line 548 of file class.ActiveRecord.php.
|
static |
Definition at line 734 of file class.ActiveRecord.php.
ActiveRecord::afterObjectLoad | ( | ) |
Definition at line 494 of file class.ActiveRecord.php.
ActiveRecord::buildFromArray | ( | array | $array | ) |
array | $array |
Definition at line 246 of file class.ActiveRecord.php.
References arObjectCache\get(), arObjectCache\isCached(), and arObjectCache\store().
|
static |
arConnector | $connector |
Definition at line 815 of file class.ActiveRecord.php.
ActiveRecord::copy | ( | $new_id = 0 | ) |
int | $new_id |
arException |
Definition at line 483 of file class.ActiveRecord.php.
References arException\COPY_DESTINATION_ID_EXISTS.
|
static |
Definition at line 744 of file class.ActiveRecord.php.
Referenced by ilStudyProgrammeType\loadTranslation(), and ilStudyProgrammeType\processAndStoreIconFile().
ActiveRecord::create | ( | ) |
Reimplemented in arStorage.
Definition at line 467 of file class.ActiveRecord.php.
References arObjectCache\store().
|
static |
string | $date_format |
Definition at line 709 of file class.ActiveRecord.php.
|
static |
Definition at line 762 of file class.ActiveRecord.php.
ActiveRecord::delete | ( | ) |
Definition at line 525 of file class.ActiveRecord.php.
References arObjectCache\purge().
|
staticfinal |
$field_name |
Definition at line 381 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 596 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 614 of file class.ActiveRecord.php.
|
static |
Definition at line 772 of file class.ActiveRecord.php.
|
staticfinal |
|
staticprotected |
string | $str |
Definition at line 891 of file class.ActiveRecord.php.
|
static |
Definition at line 752 of file class.ActiveRecord.php.
Referenced by ilBibliographicSetting\getAll(), ilStudyProgrammeType\getAllTypes(), and arConfigFormGUI\getValuesForItem().
ActiveRecord::getArConnector | ( | ) |
Definition at line 47 of file class.ActiveRecord.php.
References arConnectorMap\get().
Referenced by arWhere\asSQLStatement().
ActiveRecord::getArFieldList | ( | ) |
Definition at line 56 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 840 of file class.ActiveRecord.php.
Referenced by ilMemcacheServerTableGUI\parseData().
|
final |
Definition at line 300 of file class.ActiveRecord.php.
References $data.
Referenced by arConnectorDB\create(), and arConnectorDB\update().
|
final |
Definition at line 292 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 327 of file class.ActiveRecord.php.
References arCalledClassCache\get().
Referenced by getConnectorContainerName().
|
static |
Definition at line 782 of file class.ActiveRecord.php.
Referenced by arStorageRecordGUI\index().
ActiveRecord::getConnectorContainerName | ( | ) |
Reimplemented in ilBibliographicSetting, arMixedKey, and ilADTActiveRecordWrapper.
Definition at line 74 of file class.ActiveRecord.php.
References $connector_container_name, and getCalledClass().
Referenced by arJoin\asSQLStatement(), arWhere\asSQLStatement(), 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 803 of file class.ActiveRecord.php.
ActiveRecord::getPrimaryFieldValue | ( | ) |
Reimplemented in ilADTActiveRecordWrapper.
Definition at line 97 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 667 of file class.ActiveRecord.php.
|
static |
ActiveRecord | $ar | |
$on_this | ||
$on_external | ||
array | $fields | |
string | $operator |
Definition at line 653 of file class.ActiveRecord.php.
References getConnectorContainerName().
ActiveRecord::installConnector | ( | ) |
Definition at line 352 of file class.ActiveRecord.php.
|
finalprotected |
Definition at line 399 of file class.ActiveRecord.php.
|
staticfinal |
$arBuilder = new arBuilder(new ilYourARBasedClass()); $arBuilder->generateDBUpdateForInstallation();
Definition at line 342 of file class.ActiveRecord.php.
Referenced by arConnectorDB\resetDatabase().
|
static |
Definition at line 792 of file class.ActiveRecord.php.
|
static |
$tablename | ||
$on_this | ||
$on_external | ||
array | $fields | |
string | $operator |
Definition at line 683 of file class.ActiveRecord.php.
|
static |
$start | |
$end |
Definition at line 723 of file class.ActiveRecord.php.
|
static |
$orderBy | ||
string | $orderDirection |
Definition at line 696 of file class.ActiveRecord.php.
|
static |
|
static |
bool | $set_raw |
Definition at line 827 of file class.ActiveRecord.php.
ActiveRecord::read | ( | ) |
Reimplemented in arStorage.
Definition at line 498 of file class.ActiveRecord.php.
References $records, and arException\RECORD_NOT_FOUND.
Referenced by __construct().
|
staticfinal |
$field_name |
Definition at line 391 of file class.ActiveRecord.php.
|
staticfinal |
$old_name | |
$new_name |
Definition at line 363 of file class.ActiveRecord.php.
|
staticfinal |
|
staticabstract |
Reimplemented in ilBibliographicSetting, ilItemGroupAR, ilStudyProgramme, ilStudyProgrammeAdvancedMetadataRecord, ilStudyProgrammeAssignment, ilStudyProgrammeProgress, ilStudyProgrammeType, ilStudyProgrammeTypeTranslation, arConfig, arMessage, arUser, arMixedKey, arRealRecord, arStorageRecordStorage, ilADTActiveRecordWrapper, ilMemcacheServer, and ilWACSecurePath.
ActiveRecord::save | ( | ) |
Definition at line 462 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 200 of file class.ActiveRecord.php.
Referenced by __asCsv().
ActiveRecord::setConnectorContainerName | ( | $connector_container_name | ) |
string | $connector_container_name |
Definition at line 89 of file class.ActiveRecord.php.
References $connector_container_name.
ActiveRecord::setPrimaryFieldValue | ( | $value | ) |
$value |
Definition at line 107 of file class.ActiveRecord.php.
References arFieldCache\getPrimaryFieldName().
ActiveRecord::sleep | ( | $field_name | ) |
$field_name |
Reimplemented in ilADTActiveRecordWrapper.
Definition at line 272 of file class.ActiveRecord.php.
ActiveRecord::store | ( | ) |
Definition at line 453 of file class.ActiveRecord.php.
ActiveRecord::storeObjectToCache | ( | ) |
Definition at line 135 of file class.ActiveRecord.php.
References arObjectCache\store().
|
staticfinal |
|
staticfinal |
ActiveRecord::update | ( | ) |
Reimplemented in arStorage.
Definition at line 519 of file class.ActiveRecord.php.
References arObjectCache\store().
|
staticfinal |
Definition at line 416 of file class.ActiveRecord.php.
ActiveRecord::wakeUp | ( | $field_name, | |
$field_value | |||
) |
$field_name | |
$field_value |
Reimplemented in ilADTActiveRecordWrapper.
Definition at line 283 of file class.ActiveRecord.php.
|
static |
$where | ||
null | $operator |
Definition at line 636 of file class.ActiveRecord.php.
Referenced by ilStudyProgrammeUserProgress\__construct(), ilStudyProgrammeTypeTranslation\deleteAllTranslations(), ilStudyProgrammeType\getAssignedAdvancedMDRecords(), ilStudyProgrammeType\getAssignedStudyProgrammes(), ilObjStudyProgramme\getAssignmentsOf(), ilObjStudyProgramme\getAssignmentsRaw(), ilStudyProgrammeUserProgress\getInstanceForAssignment(), ilStudyProgrammeUserProgress\getInstancesForAssignment(), ilStudyProgrammeUserAssignment\getInstancesForProgram(), ilStudyProgrammeUserProgress\getInstancesForProgram(), ilStudyProgrammeUserProgress\getInstancesForUser(), ilStudyProgrammeUserAssignment\getInstancesOfUser(), and ilStudyProgrammeType\loadTranslation().
|
protected |
Definition at line 37 of file class.ActiveRecord.php.
|
protected |
Definition at line 41 of file class.ActiveRecord.php.
Referenced by getConnectorContainerName(), and setConnectorContainerName().
const ActiveRecord::ACTIVE_RECORD_VERSION = '2.0.7' |
Definition at line 25 of file class.ActiveRecord.php.