ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
Assetic\Cache\ConfigCache Class Reference

A config cache stores values using var_export() and include. More...

+ Collaboration diagram for Assetic\Cache\ConfigCache:

Public Member Functions

 __construct ($dir)
 Construct. More...
 
 has ($resource)
 Checks of the cache has a file. More...
 
 set ($resource, $value)
 Writes a value to a file. More...
 

Private Attributes

 $dir
 

Detailed Description

A config cache stores values using var_export() and include.

Author
Kris Wallsmith kris..nosp@m.wall.nosp@m.smith.nosp@m.@gma.nosp@m.il.co.nosp@m.m

Definition at line 19 of file ConfigCache.php.

Constructor & Destructor Documentation

◆ __construct()

Assetic\Cache\ConfigCache::__construct (   $dir)

Construct.

Parameters
string$dirThe cache directory

Definition at line 28 of file ConfigCache.php.

29 {
30 $this->dir = $dir;
31 }

References Assetic\Cache\ConfigCache\$dir.

Member Function Documentation

◆ has()

Assetic\Cache\ConfigCache::has (   $resource)

Checks of the cache has a file.

Parameters
string$resourceA cache key
Returns
Boolean True if a file exists

Definition at line 40 of file ConfigCache.php.

41 {
42 return file_exists($this->getSourcePath($resource));
43 }
getSourcePath($resource)
Returns the path where the file corresponding to the supplied cache key can be included from.

References Assetic\Cache\getSourcePath().

+ Here is the call graph for this function:

◆ set()

Assetic\Cache\ConfigCache::set (   $resource,
  $value 
)

Writes a value to a file.

Parameters
string$resourceA cache key
mixed$valueA value to cache

Definition at line 51 of file ConfigCache.php.

References Assetic\Cache\ConfigCache\$dir, $path, Assetic\Cache\getSourcePath(), and sprintf.

+ Here is the call graph for this function:

Field Documentation

◆ $dir

Assetic\Cache\ConfigCache::$dir
private

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