* * 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:----XGQG+Mq131q2+mzGZYTAQnQI3RzpD8EM+y3xfC47T9zLdMDE98htPrQKGu5oDh0eRS2K7H1rf09Sty52kpUQttVlY8sXgrOY909W0VNRcKErjDk6apu0mMRS0RZsgy1sddOxrhibKQfSdSEkY2fRUSqErDAai5x/JEsfdlL1LN0nK17aTm6iT2Hqp3LqQEjbv53JZowatmqOl96uxKCT5/rkEcL8+jkjpvZlkiRnVeE49XV+FHL1YwUAqDqRi4RHHzdUHPmCrGuEBxD+fUCH+tZWFToPvMhBsR3UQSdffuu8B5q2ITTjXGZv9nK9Otn7g/KYCzuH4F00hJ+oVl6vwqpheTX/nTA3kub5HuJsI0WCIuPQm+sJUXR/Gwsi5VtrTZNt0Dk+G60zaoZNO2I+/mBhYYXb5bNgqGJxd2iOxlSJGNYYnbX+hLpFEkwHciaq+tqIsModDJY0Wbxpyee5oQsIHGbW50xkzYF9Ky5LVz4nDFhumOgvQnT0+RwtXvK0bCRcRg5IhC7nOygpQJDafndnX728FsmDERZdHuHuulgK/U3ai9A4JjAugPZspTbZX80e04AEeofrjAOauOkdq90o5NNTuyBRONQnbKPxmOKx1o/QFn+IJS+uMHmAqL0Pmd5sOBydF8i81vB5TCS6iqmViIGgPhwYGati1HDo0OE=----ATTACHMENT:----ODU4ODAxODgyODMxMTUxMiA0MzA4NDA4NTY5NDg5NDEyIDU1MjYwMjI5NjYxODQ0MQ==