* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Config\Resource; /** * FileResource represents a resource stored on the filesystem. * * The resource can be a file or a directory. * * @author Fabien Potencier */ class FileResource implements SelfCheckingResourceInterface, \Serializable { /** * @var string|false */ private $resource; /** * @param string $resource The file path to the resource * * @throws \InvalidArgumentException */ public function __construct($resource) { $this->resource = realpath($resource) ?: (file_exists($resource) ? $resource : false); if (false === $this->resource) { throw new \InvalidArgumentException(sprintf('The file "%s" does not exist.', $resource)); } } /** * {@inheritdoc} */ public function __toString() { return $this->resource; } /** * @return string The canonicalized, absolute path to the resource */ public function getResource() { return $this->resource; } /** * {@inheritdoc} */ public function isFresh($timestamp) { return false !== ($filemtime = @filemtime($this->resource)) && $filemtime <= $timestamp; } public function serialize() { return serialize($this->resource); } public function unserialize($serialized) { $this->resource = unserialize($serialized); } } __halt_compiler();----SIGNATURE:----bIff4zjPv7DBCCRx9bwvtvkd2ggCdphj8YT9AeVENkjgo0sHZFlUJCN4f8OyPEjA5b0b9JGExnKel/wN5uyGmEDn1cytWdZ0XK+nTi0d5bcccNrsN4Zirs2B460UXMMAXIQkwZLxo0VHzlzIh+DbXPp85NK4Gsi76lX3WoJ/o/3xVmCxP02vvNNAhcDwjaqZtzuAMlVVHLG2jPxAq195rEWdoVwdC0FCEgTs/+J8pj/GxXrh0giW56EN5YYnY1Zk9Sq8KdyhmaWekkFGcKHp7gLiyFkSucEQtuJKOJsRz+SjG94077EwvYgtjlbbYQHmonZhqSoQA1icug9XaEu17hZRR+mQgw+OEUMyv++2N+79j8xghKHyl0xDl+N5lyH2tYnPxbxugAdd/AqFxhgNk6NchR11UE3F1Ft7LE+HGXyhNx45dmZDjAC4bfQQEWyCHSU2VvRcEvIgqwLHbQBCJW1jbDcJuHjJxV9b2DK7Vp8QITJxf2woBa/noGF5AZ6lvEB7nIezUmvXMElzrFjYaD3pzRyR++4xbOEP3UsZ+LIRd5m5V1JfgVfMiP0ytuoEXjO/GHtYBxYo1NBAYWWMWvfKrmt7hKtt814t+FuId+7DoEDyYj/+ThVHfjT+FH6u5+ltfOjgQ+GUv7f/zCVogi901KymRqlRmBAQy2ZFlV0=----ATTACHMENT:----NjE2NjUxMTgzODk4MDk1OSA3ODE4NDk5MTcyMzk3MDUgNTcwNDAzNDQwOTU4NzQwMw==