ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
arStorage Class Reference

Class arStorage. More...

+ Inheritance diagram for arStorage:
+ Collaboration diagram for arStorage:

Public Member Functions

 create ()
 
 update ()
 
 read ()
 
 getValueForStorage ($key)
 
 setValueToModel ($key, $value)
 
 setExternalModelForStorage ($model)
 
 getExternalModelForStorage ()
 
- Public Member Functions inherited from ActiveRecord
 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)
 

Protected Member Functions

 mapToActiveRecord ()
 
 mapFromActiveRecord ()
 
- Protected Member Functions inherited from ActiveRecord
 serializeToCSV ($field)
 This method is called for every field of your instance if you use __asCsv. More...
 
 installDatabase ()
 

Protected Attributes

 $external_model_for_storage
 
- Protected Attributes inherited from ActiveRecord
 $ar_safe_read = true
 
 $connector_container_name = ''
 

Additional Inherited Members

- Static Public Member Functions inherited from ActiveRecord
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 inherited from ActiveRecord
const ACTIVE_RECORD_VERSION = '2.0.7'
 
- Static Protected Member Functions inherited from ActiveRecord
static getCalledClass ()
 
static fromCamelCase ($str)
 

Detailed Description

Class arStorage.

Author
Fabian Schmid fs@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch
Version
2.0.7

Definition at line 11 of file class.arStorage.php.

Member Function Documentation

◆ create()

arStorage::create ( )

Definition at line 45 of file class.arStorage.php.

References mapToActiveRecord().

46  {
47  $this->mapToActiveRecord();
48  parent::create();
49  }
+ Here is the call graph for this function:

◆ getExternalModelForStorage()

arStorage::getExternalModelForStorage ( )
Returns
arTestRecord

Definition at line 127 of file class.arStorage.php.

References $external_model_for_storage.

Referenced by getValueForStorage(), and setValueToModel().

128  {
130  }
+ Here is the caller graph for this function:

◆ getValueForStorage()

arStorage::getValueForStorage (   $key)
Parameters
$key
Returns
mixed

Definition at line 87 of file class.arStorage.php.

References $key, and getExternalModelForStorage().

Referenced by mapToActiveRecord().

88  {
89  $method = self::_toCamelCase('get_' . $key);
90 
91  return $this->getExternalModelForStorage()->{$method}();
92  }
getExternalModelForStorage()
$key
Definition: croninfo.php:18
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mapFromActiveRecord()

arStorage::mapFromActiveRecord ( )
protected

Definition at line 74 of file class.arStorage.php.

References $key, ActiveRecord\getArFieldList(), ActiveRecord\getArrayForConnector(), and setValueToModel().

Referenced by read().

75  {
76  foreach (array_keys($this->getArFieldList()->getArrayForConnector()) as $key) {
77  $this->setValueToModel($key, $this->{$key});
78  }
79  }
setValueToModel($key, $value)
$key
Definition: croninfo.php:18
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mapToActiveRecord()

arStorage::mapToActiveRecord ( )
protected

Definition at line 66 of file class.arStorage.php.

References $key, ActiveRecord\getArFieldList(), ActiveRecord\getArrayForConnector(), and getValueForStorage().

Referenced by create(), and update().

67  {
68  foreach (array_keys($this->getArFieldList()->getArrayForConnector()) as $key) {
69  $this->{$key} = $this->getValueForStorage($key);
70  }
71  }
getValueForStorage($key)
$key
Definition: croninfo.php:18
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ read()

arStorage::read ( )

Definition at line 59 of file class.arStorage.php.

References mapFromActiveRecord().

60  {
61  parent::read();
62  $this->mapFromActiveRecord();
63  }
+ Here is the call graph for this function:

◆ setExternalModelForStorage()

arStorage::setExternalModelForStorage (   $model)
Parameters
arTestRecord$model

Definition at line 118 of file class.arStorage.php.

119  {
120  $this->external_model_for_storage = $model;
121  }

◆ setValueToModel()

arStorage::setValueToModel (   $key,
  $value 
)
Parameters
$key
$value
Returns
mixed

Definition at line 101 of file class.arStorage.php.

References $key, and getExternalModelForStorage().

Referenced by mapFromActiveRecord().

102  {
103  $method = self::_toCamelCase('set_' . $key);
104 
105  return $this->getExternalModelForStorage()->{$method}($value);
106  }
getExternalModelForStorage()
$key
Definition: croninfo.php:18
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ update()

arStorage::update ( )

Definition at line 52 of file class.arStorage.php.

References mapToActiveRecord(), and League\Flysystem\Adapter\Polyfill\update().

53  {
54  $this->mapToActiveRecord();
56  }
update($pash, $contents, Config $config)
+ Here is the call graph for this function:

Field Documentation

◆ $external_model_for_storage

arStorage::$external_model_for_storage
protected

Definition at line 17 of file class.arStorage.php.

Referenced by getExternalModelForStorage().


The documentation for this class was generated from the following file: