1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- <?php
- namespace Symfony\Component\Config;
- use Symfony\Component\Config\Resource\BCResourceInterfaceChecker;
- use Symfony\Component\Config\Resource\SelfCheckingResourceChecker;
- class ConfigCache extends ResourceCheckerConfigCache
- {
- private $debug;
-
- public function __construct($file, $debug)
- {
- parent::__construct($file, array(
- new SelfCheckingResourceChecker(),
- new BCResourceInterfaceChecker(),
- ));
- $this->debug = (bool) $debug;
- }
-
- public function __toString()
- {
- @trigger_error('ConfigCache::__toString() is deprecated since Symfony 2.7 and will be removed in 3.0. Use the getPath() method instead.', E_USER_DEPRECATED);
- return $this->getPath();
- }
-
- public function isFresh()
- {
- if (!$this->debug && is_file($this->getPath())) {
- return true;
- }
- return parent::isFresh();
- }
- }
|