Joomla CMS  3.10.11 (avec JPlatform 13.1 inclus)
Documentation des API du CMS Joomla en version 3.10.11 et du framework Joomla Platform intégré
Tout Structures de données Espaces de nommage Fichiers Fonctions Variables Pages
Référence de la classe FileStorage
+ Graphe d'héritage de FileStorage:

Fonctions membres publiques

 __construct ($options=array())
 
 contains ($id, $group)
 
 get ($id, $group, $checkTime=true)
 
 getAll ()
 
 store ($id, $group, $data)
 
 remove ($id, $group)
 
 clean ($group, $mode=null)
 
 gc ()
 
 lock ($id, $group, $locktime)
 
 unlock ($id, $group=null)
 
- Fonctions membres publiques hérités de CacheStorage
 __construct ($options=array())
 
 contains ($id, $group)
 
 get ($id, $group, $checkTime=true)
 
 getAll ()
 
 store ($id, $group, $data)
 
 remove ($id, $group)
 
 clean ($group, $mode=null)
 
 flush ()
 
 gc ()
 
 lock ($id, $group, $locktime)
 
 unlock ($id, $group=null)
 

Fonctions membres protégées

 _checkExpire ($id, $group)
 
 _getFilePath ($id, $group)
 
 _deleteFolder ($path)
 
 _cleanPath ($path, $ds=DIRECTORY_SEPARATOR)
 
 _filesInFolder ($path, $filter='.', $recurse=false, $fullpath=false, $exclude=array('.svn', 'CVS', '.DS_Store', '__MACOSX'), $excludefilter=array('^\..*', '.*~'))
 
 _folders ($path, $filter='.', $recurse=false, $fullpath=false, $exclude=array('.svn', 'CVS', '.DS_Store', '__MACOSX'), $excludefilter=array('^\..*'))
 
- Fonctions membres protégées hérités de CacheStorage
 _getCacheId ($id, $group)
 

Attributs protégés

 $_root
 
 $_locked_files = array()
 
- Attributs protégés hérités de CacheStorage
 $rawname
 

Membres hérités additionnels

- Fonctions membres publiques statiques hérités de CacheStorage
static isSupported ()
 
static test ()
 
static addIncludePath ($path='')
 
- Champs de données hérités de CacheStorage
 $_now
 
 $_lifetime
 
 $_locking
 
 $_language
 
 $_application
 
 $_hash
 

Description détaillée

File cache storage handler

Depuis
1.7.0
Note
For performance reasons this class does not use the Filesystem package's API

Documentation des constructeurs et destructeur

◆ __construct()

__construct (   $options = array())

Constructor

Paramètres
array$optionsOptional parameters
Depuis
1.7.0

Références $options, et $path.

Documentation des fonctions membres

◆ _checkExpire()

_checkExpire (   $id,
  $group 
)
protected

Check if a cache object has expired

Using @ error suppressor here because between if we did a file_exists() and then filemsize() there will be a little time space when another process can delete the file and then you get PHP Warning

Paramètres
string$idCache ID to check
string$groupThe cache data group
Renvoie
boolean True if the cache ID is valid
Depuis
1.7.0

Références $id, et $path.

◆ _cleanPath()

_cleanPath (   $path,
  $ds = DIRECTORY_SEPARATOR 
)
protected

Function to strip additional / or \ in a path name

Paramètres
string$pathThe path to clean
string$dsDirectory separator (optional)
Renvoie
string The cleaned path
Depuis
1.7.0

Références $path.

◆ _deleteFolder()

_deleteFolder (   $path)
protected

Quickly delete a folder of files

Paramètres
string$pathThe path to the folder to delete.
Renvoie
boolean
Depuis
1.7.0

Références $file, $files, $folder, $path, Log\add(), elseif, et Log\WARNING.

◆ _filesInFolder()

_filesInFolder (   $path,
  $filter = '.',
  $recurse = false,
  $fullpath = false,
  $exclude = array('.svn', 'CVS', '.DS_Store', '__MACOSX'),
  $excludefilter = array('^\..*', '.*~') 
)
protected

Utility function to quickly read the files in a folder.

Paramètres
string$pathThe path of the folder to read.
string$filterA filter for file names.
mixed$recurseTrue to recursively search into sub-folders, or an integer to specify the maximum depth.
boolean$fullpathTrue to return the full path to the file.
array$excludeArray with names of files which should not be shown in the result.
array$excludefilterArray of folder names to exclude
Renvoie
array Files in the given folder.
Depuis
1.7.0

Références $file, $filter, $path, Log\add(), et Log\WARNING.

◆ _folders()

_folders (   $path,
  $filter = '.',
  $recurse = false,
  $fullpath = false,
  $exclude = array('.svn', 'CVS', '.DS_Store', '__MACOSX'),
  $excludefilter = array('^\..*') 
)
protected

Utility function to read the folders in a folder.

Paramètres
string$pathThe path of the folder to read.
string$filterA filter for folder names.
mixed$recurseTrue to recursively search into sub-folders, or an integer to specify the maximum depth.
boolean$fullpathTrue to return the full path to the folders.
array$excludeArray with names of folders which should not be shown in the result.
array$excludefilterArray with regular expressions matching folders which should not be shown in the result.
Renvoie
array Folders in the given folder.
Depuis
1.7.0

Références $file, $filter, $path, Log\add(), et Log\WARNING.

◆ _getFilePath()

_getFilePath (   $id,
  $group 
)
protected

Get a cache file path from an ID/group pair

Paramètres
string$idThe cache data ID
string$groupThe cache data group
Renvoie
boolean|string The path to the data object or boolean false if the cache directory does not exist
Depuis
1.7.0

Références $id, et $name.

◆ clean()

clean (   $group,
  $mode = null 
)

Clean cache for a group given a mode.

group mode : cleans all cache in the group notgroup mode : cleans all cache not in the group

Paramètres
string$groupThe cache data group
string$modeThe mode for cleaning cache [group|notgroup]
Renvoie
boolean
Depuis
1.7.0

Références $folder, $i, $mode, $n, et $return.

◆ contains()

contains (   $id,
  $group 
)

Check if the cache contains data stored by ID and group

Paramètres
string$idThe cache data ID
string$groupThe cache data group
Renvoie
boolean
Depuis
3.7.0

Références $id.

◆ gc()

gc ( )

Garbage collect expired cache data

Renvoie
boolean
Depuis
1.7.0

Références $file, et $files.

◆ get()

get (   $id,
  $group,
  $checkTime = true 
)

Get cached data by ID and group

Paramètres
string$idThe cache data ID
string$groupThe cache data group
boolean$checkTimeTrue to verify cache time expiration threshold
Renvoie
mixed Boolean false on failure or a cached data object
Depuis
1.7.0

Références $data, $id, et $path.

◆ getAll()

getAll ( )

Get all cached data

Renvoie
mixed Boolean false on failure or a cached data object
Depuis
1.7.0

Références $data, $file, $files, $folder, $item, et $path.

◆ lock()

lock (   $id,
  $group,
  $locktime 
)

Lock cached item

Paramètres
string$idThe cache data ID
string$groupThe cache data group
integer$locktimeCached item max lock time
Renvoie
mixed Boolean false if locking failed or an object containing properties lock and locklooped
Depuis
1.7.0

Références $id, et $path.

◆ remove()

remove (   $id,
  $group 
)

Remove a cached data entry by ID and group

Paramètres
string$idThe cache data ID
string$groupThe cache data group
Renvoie
boolean
Depuis
1.7.0

Références $id, et $path.

◆ store()

store (   $id,
  $group,
  $data 
)

Store the data to cache by ID and group

Paramètres
string$idThe cache data ID
string$groupThe cache data group
string$dataThe data to store in cache
Renvoie
boolean
Depuis
1.7.0

Références $data, $id, et $path.

◆ unlock()

unlock (   $id,
  $group = null 
)

Unlock cached item

Paramètres
string$idThe cache data ID
string$groupThe cache data group
Renvoie
boolean
Depuis
1.7.0

Références $id, et $path.

Documentation des champs

◆ $_locked_files

$_locked_files = array()
protected

◆ $_root

$_root
protected

La documentation de cette classe a été générée à partir du fichier suivant :