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

Static Public Member Functions

static controllerCacheUpdated (&$config)
 
static storeDynamicRoutes ($isRest=false)
 
static getControllerCache ($isRest=false)
 
static getRouteCache ($routePath, $routeArray, $duration)
 
static isExpired ($routePath, $duration)
 
static setExpired ($routePath)
 
static setRouteCache ($routePath)
 
static addAdminRoutes ()
 
static getRoutes ()
 
static getControllerRoutes ($controllerClass, $isRest=false)
 
static addRoute ($path, $controller, $action='index', $methods=null, $name='', $isRest=false, $priority=0, $callback=null)
 
static addRoutes ($pathArray, $controller, $action='index', $methods=null, $name='')
 
static addRestRoutes ($pathArray, $controller, $action='index', $methods=null, $name='')
 
static getControllersFiles (&$config, $silent=false)
 
static getControllers ($subClass="\biquity\ontrollers\ontroller", $backslash=false, $includeSubclass=false, $includeAbstract=false)
 
static warmUpControllers ($controllers=null)
 Preloads controllers. More...
 

Static Protected Member Functions

static _getFiles (&$config, $type, $silent=false)
 
static sortByPriority (&$array)
 
static expired ($key, $duration)
 

Static Private Member Functions

static addControllerCache ($classname)
 
static parseControllerFiles (&$config, $silent=false)
 
static initRouterCache (&$config, $silent=false)
 
static storeRouteResponse ($key, $response)
 
static getRouteKey ($routePath)
 
static addRoutes_ ($pathArray, $controller, $action='index', $methods=null, $name='', $isRest=false)
 

Detailed Description

Definition at line 27 of file RouterCacheTrait.php.

Member Function Documentation

◆ _getFiles()

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

◆ addAdminRoutes()

static addAdminRoutes ( )
static

Definition at line 162 of file RouterCacheTrait.php.

◆ addControllerCache()

static addControllerCache (   $classname)
staticprivate

Definition at line 31 of file RouterCacheTrait.php.

◆ addRestRoutes()

static addRestRoutes (   $pathArray,
  $controller,
  $action = 'index',
  $methods = null,
  $name = '' 
)
static

Definition at line 201 of file RouterCacheTrait.php.

◆ addRoute()

static addRoute (   $path,
  $controller,
  $action = 'index',
  $methods = null,
  $name = '',
  $isRest = false,
  $priority = 0,
  $callback = null 
)
static

Definition at line 191 of file RouterCacheTrait.php.

◆ addRoutes()

static addRoutes (   $pathArray,
  $controller,
  $action = 'index',
  $methods = null,
  $name = '' 
)
static

Definition at line 197 of file RouterCacheTrait.php.

◆ addRoutes_()

static addRoutes_ (   $pathArray,
  $controller,
  $action = 'index',
  $methods = null,
  $name = '',
  $isRest = false 
)
staticprivate

Definition at line 205 of file RouterCacheTrait.php.

◆ controllerCacheUpdated()

static controllerCacheUpdated ( $config)
static

Definition at line 81 of file RouterCacheTrait.php.

◆ expired()

static expired (   $key,
  $duration 
)
staticprotected

Definition at line 141 of file RouterCacheTrait.php.

◆ getControllerCache()

static getControllerCache (   $isRest = false)
static
Parameters
boolean$isRest
Returns
array

Definition at line 119 of file RouterCacheTrait.php.

◆ getControllerRoutes()

static getControllerRoutes (   $controllerClass,
  $isRest = false 
)
static

Definition at line 171 of file RouterCacheTrait.php.

◆ getControllers()

static getControllers (   $subClass = "\\Ubiquity\\controllers\\Controller",
  $backslash = false,
  $includeSubclass = false,
  $includeAbstract = false 
)
static

Definition at line 219 of file RouterCacheTrait.php.

◆ getControllersFiles()

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

Definition at line 215 of file RouterCacheTrait.php.

◆ getRouteCache()

static getRouteCache (   $routePath,
  $routeArray,
  $duration 
)
static

Definition at line 126 of file RouterCacheTrait.php.

◆ getRouteKey()

static getRouteKey (   $routePath)
staticprivate

Definition at line 107 of file RouterCacheTrait.php.

◆ getRoutes()

static getRoutes ( )
static

Definition at line 166 of file RouterCacheTrait.php.

◆ initRouterCache()

static initRouterCache ( $config,
  $silent = false 
)
staticprivate

Definition at line 71 of file RouterCacheTrait.php.

◆ isExpired()

static isExpired (   $routePath,
  $duration 
)
static

Definition at line 145 of file RouterCacheTrait.php.

◆ parseControllerFiles()

static parseControllerFiles ( $config,
  $silent = false 
)
staticprivate

Definition at line 42 of file RouterCacheTrait.php.

◆ setExpired()

static setExpired (   $routePath)
static

Definition at line 149 of file RouterCacheTrait.php.

◆ setRouteCache()

static setRouteCache (   $routePath)
static

Definition at line 156 of file RouterCacheTrait.php.

◆ sortByPriority()

static sortByPriority ( $array)
staticprotected

Definition at line 64 of file RouterCacheTrait.php.

◆ storeDynamicRoutes()

static storeDynamicRoutes (   $isRest = false)
static

Definition at line 95 of file RouterCacheTrait.php.

◆ storeRouteResponse()

static storeRouteResponse (   $key,
  $response 
)
staticprivate

Definition at line 101 of file RouterCacheTrait.php.

◆ warmUpControllers()

static warmUpControllers (   $controllers = null)
static

Preloads controllers.

To use only with async servers (Swoole, Workerman)

Parameters
?array$controllers

Definition at line 251 of file RouterCacheTrait.php.


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