Autodoc
  • Namespace
  • Class
  • Tree

Namespaces

  • BlueTihi
    • Context
  • Brickrouge
    • Element
      • Nodes
    • Renderer
    • Widget
  • ICanBoogie
    • ActiveRecord
    • AutoConfig
    • CLDR
    • Composer
    • Core
    • Event
    • Exception
    • HTTP
      • Dispatcher
      • Request
    • I18n
      • Translator
    • Mailer
    • Modules
      • Taxonomy
        • Support
      • Thumbnailer
        • Versions
    • Object
    • Operation
      • Dispatcher
    • Prototype
    • Routes
    • Routing
      • Dispatcher
    • Session
  • Icybee
    • ActiveRecord
      • Model
    • ConfigOperation
    • Document
    • EditBlock
    • Element
      • ActionbarContextual
      • ActionbarSearch
      • ActionbarToolbar
    • FormBlock
    • Installer
    • ManageBlock
    • Modules
      • Articles
      • Cache
        • Collection
        • ManageBlock
      • Comments
        • ManageBlock
      • Contents
        • ManageBlock
      • Dashboard
      • Editor
        • Collection
      • Files
        • File
        • ManageBlock
      • Forms
        • Form
        • ManageBlock
      • I18n
      • Images
        • ManageBlock
      • Members
      • Modules
        • ManageBlock
      • Nodes
        • ManageBlock
        • Module
      • Pages
        • BreadcrumbElement
        • LanguagesElement
        • ManageBlock
        • NavigationBranchElement
        • NavigationElement
        • Page
        • PageController
      • Registry
      • Search
      • Seo
      • Sites
        • ManageBlock
      • Taxonomy
        • Terms
          • ManageBlock
        • Vocabulary
          • ManageBlock
      • Users
        • ManageBlock
        • NonceLogin
        • Roles
      • Views
        • ActiveRecordProvider
        • Collection
        • View
    • Operation
      • ActiveRecord
      • Constructor
      • Module
      • Widget
    • Rendering
  • None
  • Patron
  • PHP

Classes

  • BaseOperation
  • CacheManager
  • CatalogsCacheManager
  • ClearOperation
  • Collection
  • ConfigOperation
  • ConfigsCacheManager
  • DisableOperation
  • EditorOperation
  • EnableOperation
  • Hooks
  • ManageBlock
  • Module
  • ModulesCacheManager
  • StatOperation

Interfaces

  • CacheManagerInterface

Exceptions

  • CacheNotDefined
 1 <?php
 2 
 3 /*
 4  * This file is part of the Icybee package.
 5  *
 6  * (c) Olivier Laviale <olivier.laviale@gmail.com>
 7  *
 8  * For the full copyright and license information, please view the LICENSE
 9  * file that was distributed with this source code.
10  */
11 
12 namespace Icybee\Modules\Cache;
13 
14 /**
15  * Configurations cache manager.
16  */
17 class ConfigsCacheManager extends CacheManager
18 {
19     public $title = "Configurations";
20     public $description = "Configurations des différents composants du framework.";
21     public $group = 'system';
22 
23     public function __construct()
24     {
25         global $core;
26 
27         $this->state = $core->config['cache configs'];
28     }
29 
30     /**
31      * Clears the cache.
32      */
33     public function clear()
34     {
35         global $core;
36 
37         $path = $core->config['repository.cache'] . '/core';
38         $files = glob(\ICanBoogie\DOCUMENT_ROOT . $path . '/config_*');
39 
40         foreach ($files as $file)
41         {
42             unlink($file);
43         }
44 
45         return count($files);
46     }
47 
48     /**
49      * Disables the cache.
50      *
51      * Unsets the `enable_modules_cache` var.
52      */
53     public function disable()
54     {
55         global $core;
56 
57         unset($core->vars['enable_configs_cache']);
58 
59         return true;
60     }
61 
62     /**
63      * Enables the cache.
64      *
65      * Sets the `enable_modules_cache` var.
66      */
67     public function enable()
68     {
69         global $core;
70 
71         $core->vars['enable_configs_cache'] = true;
72 
73         return true;
74     }
75 
76     /**
77      * Return stats about the cache.
78      */
79     public function stat()
80     {
81         global $core;
82 
83         $path = $core->config['repository.cache'] . '/core';
84 
85         return Module::get_files_stat($path, '#^config_#');
86     }
87 }
Autodoc API documentation generated by ApiGen 2.8.0