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  * Catalogs cache manager.
16  */
17 class CatalogsCacheManager extends CacheManager
18 {
19     public $title = "Traductions";
20     public $description = "Traductions par langue pour l'ensemble du framework.";
21     public $group = 'system';
22 
23     public function __construct()
24     {
25         global $core;
26 
27         $this->state = $core->config['cache catalogs'];
28     }
29 
30     /**
31      * Clears the cache.
32      */
33     public function clear()
34     {
35         global $core;
36 
37         $files = glob(\ICanBoogie\REPOSITORY . 'cache/core/i18n_*');
38 
39         foreach ($files as $file)
40         {
41             unlink($file);
42         }
43 
44         return count($files);
45     }
46 
47     /**
48      * Disables the cache.
49      *
50      * Unsets the `enable_catalogs_cache` var.
51      */
52     public function disable()
53     {
54         global $core;
55 
56         unset($core->vars['enable_catalogs_cache']);
57 
58         return true;
59     }
60 
61     /**
62      * Enables the cache.
63      *
64      * Sets the `enable_catalogs_cache` var.
65      */
66     public function enable()
67     {
68         global $core;
69 
70         $core->vars['enable_catalogs_cache'] = true;
71 
72         return true;
73     }
74 
75     /**
76      * Return stats about the cache.
77      */
78     public function stat()
79     {
80         return Module::get_files_stat(\ICanBoogie\REPOSITORY . 'cache/core', '#^i18n_#');
81     }
82 }
Autodoc API documentation generated by ApiGen 2.8.0