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  * Modules cache manager.
16  */
17 class ModulesCacheManager extends CacheManager
18 {
19     const REGEX = '/^cached_modules_/';
20 
21     public $title = "Modules";
22     public $description = "Index des modules disponibles pour le framework.";
23     public $group = 'system';
24 
25     public function __construct()
26     {
27         global $core;
28 
29         $this->state = $core->config['cache modules'];
30     }
31 
32     /**
33      * Clears the cache.
34      */
35     public function clear()
36     {
37         global $core;
38 
39         $iterator = $core->vars->matching(self::REGEX);
40         $iterator->delete();
41 
42         return true;
43     }
44 
45     /**
46      * Disables the cache.
47      *
48      * Unsets the `enable_modules_cache` var.
49      */
50     public function disable()
51     {
52         global $core;
53 
54         unset($core->vars['enable_modules_cache']);
55 
56         return true;
57     }
58 
59     /**
60      * Enables the cache.
61      *
62      * Sets the `enable_modules_cache` var.
63      */
64     public function enable()
65     {
66         global $core;
67 
68         $core->vars['enable_modules_cache'] = true;
69 
70         return true;
71     }
72 
73     /**
74      * Return stats about the cache.
75      */
76     public function stat()
77     {
78         return Module::get_vars_stat(self::REGEX);
79     }
80 }
Autodoc API documentation generated by ApiGen 2.8.0