Ejemplo n.º 1
0
 /**
  * Obtiene el nombre registrado del componente o una instancia de el.
  *
  * @return mixed
  */
 protected static function getComponent()
 {
     return \ForeverPHP\Cache\Cache::getInstance();
 }
Ejemplo n.º 2
0
 /**
  * Obtiene o crea la instancia singleton de Cache.
  *
  * @return \ForeverPHP\Cache\Cache
  */
 public static function getInstance()
 {
     if (is_null(static::$instance)) {
         static::$instance = new static();
         static::$instance->load();
     }
     return static::$instance;
 }