]> git.mxchange.org Git - friendica.git/blob - vendor/smarty/smarty/libs/sysplugins/smarty_internal_method_clearallcache.php
Add Smarty to Composer
[friendica.git] / vendor / smarty / smarty / libs / sysplugins / smarty_internal_method_clearallcache.php
1 <?php
2
3 /**
4  * Smarty Method ClearAllCache
5  *
6  * Smarty::clearAllCache() method
7  *
8  * @package    Smarty
9  * @subpackage PluginsInternal
10  * @author     Uwe Tews
11  */
12 class Smarty_Internal_Method_ClearAllCache
13 {
14     /**
15      * Valid for Smarty object
16      *
17      * @var int
18      */
19     public $objMap = 1;
20
21     /**
22      * Empty cache folder
23      *
24      * @api  Smarty::clearAllCache()
25      * @link http://www.smarty.net/docs/en/api.clear.all.cache.tpl
26      *
27      * @param \Smarty  $smarty
28      * @param  integer $exp_time expiration time
29      * @param  string  $type     resource type
30      *
31      * @return integer number of cache files deleted
32      */
33     public function clearAllCache(Smarty $smarty, $exp_time = null, $type = null)
34     {
35         $smarty->_clearTemplateCache();
36         // load cache resource and call clearAll
37         $_cache_resource = Smarty_CacheResource::load($smarty, $type);
38         return $_cache_resource->clearAll($smarty, $exp_time);
39     }
40 }