Namespaces

  • Latte
    • Loaders
    • Macros
    • Runtime
  • Nette
    • Application
      • Responses
      • Routers
      • UI
    • Bridges
      • ApplicationDI
      • ApplicationLatte
      • ApplicationTracy
      • CacheDI
      • CacheLatte
      • DatabaseDI
      • DatabaseTracy
      • DITracy
      • FormsDI
      • FormsLatte
      • Framework
      • HttpDI
      • HttpTracy
      • MailDI
      • ReflectionDI
      • SecurityDI
      • SecurityTracy
    • Caching
      • Storages
    • ComponentModel
    • Database
      • Conventions
      • Drivers
      • Reflection
      • Table
    • DI
      • Config
        • Adapters
      • Extensions
    • Forms
      • Controls
      • Rendering
    • Http
    • Iterators
    • Loaders
    • Localization
    • Mail
    • Neon
    • PhpGenerator
    • Reflection
    • Security
    • Utils
  • none
  • Tracy
    • Bridges
      • Nette

Classes

  • DevNullStorage
  • FileJournal
  • FileStorage
  • MemcachedStorage
  • MemoryStorage
  • NewMemcachedStorage
  • PhpFileStorage
  • SQLiteStorage

Interfaces

  • IJournal
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Other releases
  • Nette homepage
 1: <?php
 2: 
 3: /**
 4:  * This file is part of the Nette Framework (https://nette.org)
 5:  * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 6:  */
 7: 
 8: namespace Nette\Caching\Storages;
 9: 
10: use Nette;
11: 
12: 
13: /**
14:  * @deprecated
15:  */
16: class PhpFileStorage extends FileStorage
17: {
18:     /** @var string */
19:     public $hint;
20: 
21: 
22:     /**
23:      * Reads cache data from disk.
24:      * @param  array
25:      * @return mixed
26:      */
27:     protected function readData($meta)
28:     {
29:         return array(
30:             'file' => $meta[self::FILE],
31:             'handle' => $meta[self::HANDLE],
32:         );
33:     }
34: 
35: 
36:     /**
37:      * Returns file name.
38:      * @param  string
39:      * @return string
40:      */
41:     protected function getCacheFile($key)
42:     {
43:         return parent::getCacheFile(substr_replace(
44:             $key,
45:             trim(strtr($this->hint, '\\/@', '.._'), '.') . '-',
46:             strpos($key, Nette\Caching\Cache::NAMESPACE_SEPARATOR) + 1,
47:             0
48:         )) . '.php';
49:     }
50: 
51: 
52:     /**
53:      * @return string
54:      */
55:     public function getDir()
56:     {
57:         return dirname(parent::getCacheFile(NULL));
58:     }
59: 
60: }
61: 
Nette 2.3-20161221 API API documentation generated by ApiGen 2.8.0