Ubiquity  2.3.10
php rapid development framework
ModelsCacheTrait Class Reference
+ Inheritance diagram for ModelsCacheTrait:

Static Public Member Functions

static createOrmModelCache ($classname)
 
static getOrmModelCache ($classname)
 
static getModelCacheKey ($classname)
 
static modelCacheExists ($classname)
 
static initModelsCache (&$config, $forChecking=false, $silent=false)
 
static modelsCacheUpdated (&$config)
 Checks if the models cache is up to date. More...
 
static getModelsFiles (&$config, $silent=false)
 Returns an array of files corresponding to models. More...
 
static getModels (&$config, $silent=false, $databaseOffset='default')
 Returns an array of the models class names. More...
 
static getModelsDatabases ()
 
static warmUpModels (&$config, $offset='default', $models=null)
 Preloads models metadatas. More...
 

Static Protected Member Functions

static _getFiles (&$config, $type, $silent=false)
 

Detailed Description

Definition at line 25 of file ModelsCacheTrait.php.

Member Function Documentation

◆ _getFiles()

static _getFiles ( $config,
  $type,
  $silent = false 
)
staticabstractprotected

◆ createOrmModelCache()

static createOrmModelCache (   $classname)
static

Definition at line 29 of file ModelsCacheTrait.php.

◆ getModelCacheKey()

static getModelCacheKey (   $classname)
static

Definition at line 43 of file ModelsCacheTrait.php.

◆ getModels()

static getModels ( $config,
  $silent = false,
  $databaseOffset = 'default' 
)
static

Returns an array of the models class names.

Parameters
array$config
boolean$silent
Returns
string[]

Definition at line 123 of file ModelsCacheTrait.php.

◆ getModelsDatabases()

static getModelsDatabases ( )
static

Definition at line 140 of file ModelsCacheTrait.php.

◆ getModelsFiles()

static getModelsFiles ( $config,
  $silent = false 
)
static

Returns an array of files corresponding to models.

Parameters
array$config
boolean$silent
Returns
array

Definition at line 112 of file ModelsCacheTrait.php.

◆ getOrmModelCache()

static getOrmModelCache (   $classname)
static

Definition at line 39 of file ModelsCacheTrait.php.

◆ initModelsCache()

static initModelsCache ( $config,
  $forChecking = false,
  $silent = false 
)
static

Definition at line 54 of file ModelsCacheTrait.php.

◆ modelCacheExists()

static modelCacheExists (   $classname)
static

Definition at line 47 of file ModelsCacheTrait.php.

◆ modelsCacheUpdated()

static modelsCacheUpdated ( $config)
static

Checks if the models cache is up to date.

Parameters
array$config
Returns
boolean|array

Definition at line 89 of file ModelsCacheTrait.php.

◆ warmUpModels()

static warmUpModels ( $config,
  $offset = 'default',
  $models = null 
)
static

Preloads models metadatas.

To use only with async servers (Swoole, Workerman)

Parameters
array$config
string$offset
?array$models

Definition at line 155 of file ModelsCacheTrait.php.


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