Verzeichnisstruktur phpBB-3.3.15
- Veröffentlicht
- 28.08.2024
So funktioniert es
|
Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück |
Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
ConfigCache.php
01 <?php
02
03 /*
04 * This file is part of the Symfony package.
05 *
06 * (c) Fabien Potencier <fabien@symfony.com>
07 *
08 * For the full copyright and license information, please view the LICENSE
09 * file that was distributed with this source code.
10 */
11
12 namespace Symfony\Component\Config;
13
14 use Symfony\Component\Config\Resource\SelfCheckingResourceChecker;
15
16 /**
17 * ConfigCache caches arbitrary content in files on disk.
18 *
19 * When in debug mode, those metadata resources that implement
20 * \Symfony\Component\Config\Resource\SelfCheckingResourceInterface will
21 * be used to check cache freshness.
22 *
23 * @author Fabien Potencier <fabien@symfony.com>
24 * @author Matthias Pigulla <mp@webfactory.de>
25 */
26 class ConfigCache extends ResourceCheckerConfigCache
27 {
28 private $debug;
29
30 /**
31 * @param string $file The absolute cache path
32 * @param bool $debug Whether debugging is enabled or not
33 */
34 public function __construct($file, $debug)
35 {
36 $this->debug = (bool) $debug;
37
38 $checkers = [];
39 if (true === $this->debug) {
40 $checkers = [new SelfCheckingResourceChecker()];
41 }
42
43 parent::__construct($file, $checkers);
44 }
45
46 /**
47 * Checks if the cache is still fresh.
48 *
49 * This implementation always returns true when debug is off and the
50 * cache file exists.
51 *
52 * @return bool true if the cache is fresh, false otherwise
53 */
54 public function isFresh()
55 {
56 if (!$this->debug && is_file($this->getPath())) {
57 return true;
58 }
59
60 return parent::isFresh();
61 }
62 }
63