getDriver() public method

public getDriver ( )
Exemplo n.º 1
0
 /**
  * CacheReader constructor.
  */
 public function __construct(Pool $pool)
 {
     if ($pool->getDriver() instanceof Ephemeral) {
         throw new InvalidCacheDriverException("Ephemeral cannot be used as a cache driver in this app");
     }
     $this->pool = $pool;
 }
Exemplo n.º 2
0
 /**
  * Disables the cache
  */
 public function disable()
 {
     // save the current driver if not yet black hole so it can be restored on enable()
     if (!$this->pool->getDriver() instanceof BlackHole) {
         $this->driver = $this->pool->getDriver();
     }
     $this->pool->setDriver(new BlackHole());
     $this->enabled = false;
 }