M1\Vars\Cache\CacheProvider::getProvide PHP Method

getProvide() public method

Returns if cache is on or off
public getProvide ( ) : boolean
return boolean Is cache on or off
    public function getProvide()
    {
        return $this->provide;
    }

Usage Example

Beispiel #1
0
 /**
  * Checks if the base and cache paths have been set, if not set then will use the $resource as the base path
  *
  * @param string $resource The resource to use to set the paths if they haven't been set
  */
 public function pathsLoadedCheck($resource)
 {
     if (!$this->paths_loaded) {
         $path = $this->getPath();
         if (!$path) {
             $file = pathinfo(realpath($resource));
             $path = $file['dirname'];
             $this->setPath($path);
         }
         if ($this->cache->getProvide() && !$this->cache->getPath()) {
             $this->cache->setPath($path);
         }
         $this->paths_loaded = true;
     }
 }