ADT Active Record service wrapper class.
More...
|
static | returnDbTableName () |
|
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) |
|
ADT Active Record service wrapper class.
:TODO: EXPERIMENTAL!
This class expects a valid primary for all actions!
- Author
- Jörg Lützenkirchen luetz.nosp@m.enki.nosp@m.rchen.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
- Version
- $Id$
Definition at line 17 of file class.ilADTActiveRecordWrapper.php.
◆ __construct()
◆ getActiveRecordFieldTypeFromMDB2()
ilADTActiveRecordWrapper::getActiveRecordFieldTypeFromMDB2 |
( |
|
$a_mdb2_type | ) |
|
|
protected |
◆ getConnectorContainerName()
ilADTActiveRecordWrapper::getConnectorContainerName |
( |
| ) |
|
◆ getPrimaryFieldValue()
ilADTActiveRecordWrapper::getPrimaryFieldValue |
( |
| ) |
|
◆ initFieldList()
ilADTActiveRecordWrapper::initFieldList |
( |
| ) |
|
|
protected |
Get field list instance for ADT group.
Definition at line 79 of file class.ilADTActiveRecordWrapper.php.
References $fields, array, fields, getActiveRecordFieldTypeFromMDB2(), and properties.
Referenced by __construct().
81 require_once
"Services/ActiveRecord/classes/Fields/class.arFieldList.php";
87 foreach($this->
properties->getActiveRecordFields() as $element_id => $element_fields)
89 foreach($element_fields as $field)
91 $this->field_element_map[$field->getName()] = $element_id;
101 if(
sizeof($this->
properties->getPrimary()) > 1)
103 throw new ilException(
"ilADTActiveRecordWrapper - no complex primary keys supported yet");
106 foreach($this->
properties->getPrimary() as $primary_id => $primary_element)
109 $field->setHasField(
true);
110 $field->setNotNull(
true);
112 $field->setName($primary_id);
113 $this->
fields->setPrimaryField($field);
Base class for ILIAS Exception handling.
getActiveRecordFieldTypeFromMDB2($a_mdb2_type)
Create styles array
The data for the language used.
◆ returnDbTableName()
static ilADTActiveRecordWrapper::returnDbTableName |
( |
| ) |
|
|
static |
◆ sleep()
ilADTActiveRecordWrapper::sleep |
( |
|
$field_name | ) |
|
Definition at line 143 of file class.ilADTActiveRecordWrapper.php.
References properties.
145 if(array_key_exists($field_name, $this->field_element_map))
147 $element = $this->
properties->getElement($this->field_element_map[$field_name]);
148 return $element->getFieldValue($field_name);
◆ wakeUp()
ilADTActiveRecordWrapper::wakeUp |
( |
|
$field_name, |
|
|
|
$field_value |
|
) |
| |
Definition at line 155 of file class.ilADTActiveRecordWrapper.php.
References properties.
157 if(array_key_exists($field_name, $this->field_element_map))
159 $element = $this->
properties->getElement($this->field_element_map[$field_name]);
160 return $element->setFieldValue($field_name, $field_value);
◆ $field_element_map
ilADTActiveRecordWrapper::$field_element_map |
|
protected |
◆ $fields
ilADTActiveRecordWrapper::$fields |
|
protected |
◆ $properties
ilADTActiveRecordWrapper::$properties |
|
protected |
The documentation for this class was generated from the following file: