Ubiquity 2.5.2
php rapid development framework
Loading...
Searching...
No Matches
ModelsCacheTrait Class Reference

Ubiquity\cache\traits$ModelsCacheTrait This class is part of Ubiquity. More...

+ Inheritance diagram for ModelsCacheTrait:

Static Public Member Functions

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

Static Protected Member Functions

static _getFiles (array &$config, string $type, bool $silent=false)
 
static _getAllFiles (array &$config, string $type, bool $silent=false)
 

Static Private Attributes

static $modelsDatabaseKey = 'models' . \DIRECTORY_SEPARATOR . '_modelsDatabases'
 

Detailed Description

Ubiquity\cache\traits$ModelsCacheTrait This class is part of Ubiquity.

Author
jcheron myadd.nosp@m.ress.nosp@m.mail@.nosp@m.gmai.nosp@m.l.com
Version
1.0.5 @staticvar \Ubiquity\cache\system\AbstractDataCache $cache

Definition at line 24 of file ModelsCacheTrait.php.

Member Function Documentation

◆ _getAllFiles()

static _getAllFiles ( array &  $config,
string  $type,
bool  $silent = false 
)
staticabstractprotected

Reimplemented in CacheManager.

◆ _getFiles()

static _getFiles ( array &  $config,
string  $type,
bool  $silent = false 
)
staticabstractprotected

◆ createOrmModelCache()

static createOrmModelCache ( string  $classname)
static

Definition at line 31 of file ModelsCacheTrait.php.

◆ getAllModelsFiles()

static getAllModelsFiles ( array &  $config,
bool  $silent = false 
)
static

Returns an array of all model files.

Parameters
array$config
boolean$silent
Returns
array

Definition at line 132 of file ModelsCacheTrait.php.

◆ getDatabases()

static getDatabases ( )
static

Definition at line 187 of file ModelsCacheTrait.php.

◆ getModelCacheKey()

static getModelCacheKey ( string  $classname)
static

Definition at line 45 of file ModelsCacheTrait.php.

◆ getModels()

static getModels ( array &  $config,
bool  $silent = false,
string  $databaseOffset = 'default' 
)
static

Returns an array of the models class names.

Parameters
array$config
boolean$silent
?string$databaseOffset
Returns
string[]

Definition at line 144 of file ModelsCacheTrait.php.

◆ getModelsDatabases()

static getModelsDatabases ( )
static

Definition at line 176 of file ModelsCacheTrait.php.

◆ getModelsFiles()

static getModelsFiles ( array &  $config,
bool  $silent = false 
)
static

Returns an array of files corresponding to models.

Parameters
array$config
boolean$silent
Returns
array

Definition at line 121 of file ModelsCacheTrait.php.

◆ getModelsNamespace()

static getModelsNamespace ( string  $databaseOffset = 'default')
static

Definition at line 165 of file ModelsCacheTrait.php.

◆ getOrmModelCache()

static getOrmModelCache ( string  $classname)
static

Definition at line 41 of file ModelsCacheTrait.php.

◆ initModelsCache()

static initModelsCache ( array &  $config,
bool  $forChecking = false,
bool  $silent = false 
)
static

Definition at line 56 of file ModelsCacheTrait.php.

◆ modelCacheExists()

static modelCacheExists ( string  $classname)
static

Definition at line 49 of file ModelsCacheTrait.php.

◆ modelsCacheUpdated()

static modelsCacheUpdated ( array &  $config)
static

Checks if the models cache is up to date.

Parameters
array$config
Returns
array

Definition at line 98 of file ModelsCacheTrait.php.

◆ storeModelsDatabases()

static storeModelsDatabases ( array  $modelsDatabases)
static

Definition at line 183 of file ModelsCacheTrait.php.

◆ warmUpModels()

static warmUpModels ( array &  $config,
string  $offset = 'default',
?array  $models = null 
)
static

Preloads models metadatas.

To use only with async servers (Swoole, Workerman)

Parameters
array$config
string$offset
?array$models

Definition at line 199 of file ModelsCacheTrait.php.

Field Documentation

◆ $modelsDatabaseKey

$modelsDatabaseKey = 'models' . \DIRECTORY_SEPARATOR . '_modelsDatabases'
staticprivate

Definition at line 29 of file ModelsCacheTrait.php.


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