*/ class ConfigCache { private $dir; /** * Construct. * * @param string $dir The cache directory */ public function __construct($dir) { $this->dir = $dir; } /** * Checks of the cache has a file. * * @param string $resource A cache key * * @return Boolean True if a file exists */ public function has($resource) { return file_exists($this->getSourcePath($resource)); } /** * Writes a value to a file. * * @param string $resource A cache key * @param mixed $value A value to cache */ public function set($resource, $value) { $path = $this->getSourcePath($resource); if (!is_dir($dir = dirname($path)) && false === @mkdir($dir, 0777, true)) { // @codeCoverageIgnoreStart throw new \RuntimeException('Unable to create directory '.$dir); // @codeCoverageIgnoreEnd } if (false === @file_put_contents($path, sprintf("getSourcePath($resource); if (!file_exists($path)) { throw new \RuntimeException('There is no cached value for '.$resource); } return include $path; } /** * Returns a timestamp for when the cache was created. * * @param string $resource A cache key * * @return integer A UNIX timestamp */ public function getTimestamp($resource) { $path = $this->getSourcePath($resource); if (!file_exists($path)) { throw new \RuntimeException('There is no cached value for '.$resource); } if (false === $mtime = @filemtime($path)) { // @codeCoverageIgnoreStart throw new \RuntimeException('Unable to determine file mtime for '.$path); // @codeCoverageIgnoreEnd } return $mtime; } /** * Returns the path where the file corresponding to the supplied cache key can be included from. * * @param string $resource A cache key * * @return string A file path */ private function getSourcePath($resource) { $key = md5($resource); return $this->dir.'/'.$key[0].'/'.$key.'.php'; } } __halt_compiler();----SIGNATURE:----Gk8o5u4pdRoLllTLv5DoG5pa92GNdntJzv4G3u+sxUdQag5atLzQUNx1o1eiToXDgZwqrgmxm777pp6Wl6PmC96WAXCCUW+/isvdObu5B7TjZ+zH7uUl+g8OMsfTsI70iMhpVtOYiNQR0S+57QIq5FsVB/o0078ifTwg+B28eGF3+H2bm5jKDMiB/8pMa+1QsrEQPGL9hcNA9E1uYdPD60rms8D+YU8xR2YQl0FLfAct2L0ueszv/QdnlaPqFPdfksjUOcS8Cv3EKQ2Q1lepV6PwHcJFA6rz2m+yF3mSyNv84krO54t+zjZAmf9XL0uBvDUAqehxv0gOGgAJbMJC0lfDd2v8buyh4sqt3fQONf4Xwwv/vdv0JS4lf4HHahrZBMJegkruhAsRAhWKygelktiiE9pD1by1M7CxOcHDRAGH5bnP2SoqW5BfuQNARyjMsJIdrgFMgHmerwKf3TzgKJPGm/I0h9KqxbEWEyOLRMuXLmy9BSa7dhtbPna7bZfyiJ+bsF/ts0BRc+ds0mdgHBgoHBDu+h4nrcJ/z/Kh1N4qQ0k5JjY6lt9JawIh1/oYPlFuCso/nQJpSIzhW2GWGThDJdBBZ8isKTyyuO1fr1fuoBxYkw0nAxaLaWzMdeuqf6/HI4VgwPYe39u4VFfUSlHwRiJ977tNWdtVFpLJ5WI=----ATTACHMENT:----MTI5NjQyODc0MzA1NTY3MCA0NjE1Mjk0NTUzMTUyOTY1IDU3MDMzNTYyNzQ1MzI5NQ==