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

Class ilGSProviderStorage. More...

+ Inheritance diagram for ilGSProviderStorage:
+ Collaboration diagram for ilGSProviderStorage:

Public Member Functions

 getCache ()
 
 getConnectorContainerName ()
 
 getProviderClass ()
 
 setProviderClass (string $provider_class)
 
 getPurpose ()
 
 setPurpose (string $purpose)
 
 isDynamic ()
 
 setDynamic (bool $dynamic)
 
 getInstance ()
 
- Public Member Functions inherited from CachedActiveRecord
 getCache ()
 
 getCacheIdentifier ()
 
 getTTL ()
 
 __construct ($primary_key=0, arConnector $connector=null)
 
 afterObjectLoad ()
 
 storeObjectToCache ()
 
 buildFromArray (array $array)
 
 store ()
 
 save ()
 
 create ()
 
 copy ($new_id=0)
 
 read ()
 
 update ()
 
 delete ()
 
- 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)
 

Static Public Member Functions

static registerIdentifications (string $class_name, string $purpose)
 
- Static Public Member Functions inherited from CachedActiveRecord
static find ($primary_key, array $add_constructor_args=array())
 
static connector (arConnector $connector)
 
- 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)
 

Protected Attributes

 $provider_class
 
 $purpose = ''
 
 $dynamic = false
 
 $instance
 
 $connector_container_name = "il_gs_providers"
 
- Protected Attributes inherited from ActiveRecord
 $ar_safe_read = true
 
 $connector_container_name = ''
 

Additional Inherited Members

- Data Fields inherited from ActiveRecord
const ACTIVE_RECORD_VERSION = '2.0.7'
 
- Protected Member Functions inherited from ActiveRecord
 serializeToCSV ($field)
 This method is called for every field of your instance if you use __asCsv. More...
 
 installDatabase ()
 
- Static Protected Member Functions inherited from ActiveRecord
static getCalledClass ()
 
static fromCamelCase ($str)
 

Detailed Description

Member Function Documentation

◆ getCache()

ilGSProviderStorage::getCache ( )

Definition at line 14 of file class.ilGSProviderStorage.php.

References ilGlobalCache\COMP_GLOBAL_SCREEN, and ilGlobalCache\getInstance().

+ Here is the call graph for this function:

◆ getConnectorContainerName()

ilGSProviderStorage::getConnectorContainerName ( )
final

◆ getInstance()

ilGSProviderStorage::getInstance ( )
Returns
Provider

Definition at line 163 of file class.ilGSProviderStorage.php.

References $DIC, $instance, $provider_class, and Sabre\Event\Loop\instance().

164  {
165  global $DIC;
166  if (!$this->instance instanceof ILIAS\GlobalScreen\Provider\Provider) {
167  $class_name = $this->provider_class;
168  $this->instance = new $class_name($DIC);
169  }
170 
171  return $this->instance;
172  }
global $DIC
Definition: saml.php:7
Class BaseForm.
instance(Loop $newLoop=null)
Retrieves or sets the global Loop object.
Definition: functions.php:173
+ Here is the call graph for this function:

◆ getProviderClass()

ilGSProviderStorage::getProviderClass ( )
Returns
string

Definition at line 97 of file class.ilGSProviderStorage.php.

References $provider_class.

97  : string
98  {
99  return $this->provider_class;
100  }

◆ getPurpose()

ilGSProviderStorage::getPurpose ( )
Returns
string

Definition at line 119 of file class.ilGSProviderStorage.php.

References $purpose.

119  : string
120  {
121  return $this->purpose;
122  }

◆ isDynamic()

ilGSProviderStorage::isDynamic ( )
Returns
bool

Definition at line 141 of file class.ilGSProviderStorage.php.

References $dynamic.

141  : bool
142  {
143  return $this->dynamic;
144  }

◆ registerIdentifications()

static ilGSProviderStorage::registerIdentifications ( string  $class_name,
string  $purpose 
)
static
Parameters
string$class_name
string$purpose

Definition at line 24 of file class.ilGSProviderStorage.php.

References $instance, CachedActiveRecord\find(), and ilGSIdentificationStorage\registerIdentification().

Referenced by ilObjDefReader\handlerBeginTag(), and ilMMTopItemGUI\restore().

25  {
26  if (!class_exists($class_name)) {
27  throw new LogicException("Cannot store unknown provider {$class_name}");
28  }
29 
30  $gsp = ilGSProviderStorage::find($class_name);
31  if ($gsp === null) {
32  $gsp = new ilGSProviderStorage();
33  $gsp->setProviderClass($class_name);
34  $gsp->create();
35  }
36  $gsp->setProviderClass($class_name);
37  $gsp->setPurpose($purpose);
38  $gsp->setDynamic(in_array(DynamicProvider::class, class_implements($class_name)));
39  $gsp->update();
40 
41  $instance = $gsp->getInstance();
42 
43  foreach ($instance->getAllIdentifications() as $identification) {
45  }
46  }
static find($primary_key, array $add_constructor_args=array())
Class ilGSProviderStorage.
static registerIdentification(\ILIAS\GlobalScreen\Identification\IdentificationInterface $identification, \ILIAS\GlobalScreen\Provider\Provider $provider)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setDynamic()

ilGSProviderStorage::setDynamic ( bool  $dynamic)
Parameters
bool$dynamic
Returns
ilGSProviderStorage

Definition at line 152 of file class.ilGSProviderStorage.php.

References $dynamic.

153  {
154  $this->dynamic = $dynamic;
155 
156  return $this;
157  }
Class ilGSProviderStorage.

◆ setProviderClass()

ilGSProviderStorage::setProviderClass ( string  $provider_class)
Parameters
string$provider_class
Returns
ilGSProviderStorage

Definition at line 108 of file class.ilGSProviderStorage.php.

References $provider_class.

109  {
110  $this->provider_class = $provider_class;
111 
112  return $this;
113  }
Class ilGSProviderStorage.

◆ setPurpose()

ilGSProviderStorage::setPurpose ( string  $purpose)
Parameters
string$purpose
Returns
ilGSProviderStorage

Definition at line 130 of file class.ilGSProviderStorage.php.

References $purpose.

131  {
132  $this->purpose = $purpose;
133 
134  return $this;
135  }
Class ilGSProviderStorage.

Field Documentation

◆ $connector_container_name

ilGSProviderStorage::$connector_container_name = "il_gs_providers"
protected

Definition at line 82 of file class.ilGSProviderStorage.php.

Referenced by getConnectorContainerName().

◆ $dynamic

ilGSProviderStorage::$dynamic = false
protected

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

Referenced by isDynamic(), and setDynamic().

◆ $instance

ilGSProviderStorage::$instance
protected

Definition at line 78 of file class.ilGSProviderStorage.php.

Referenced by getInstance(), and registerIdentifications().

◆ $provider_class

ilGSProviderStorage::$provider_class
protected

Definition at line 58 of file class.ilGSProviderStorage.php.

Referenced by getInstance(), getProviderClass(), and setProviderClass().

◆ $purpose

ilGSProviderStorage::$purpose = ''
protected

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

Referenced by getPurpose(), and setPurpose().


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