*/ class CoalescingDirectoryResource implements IteratorResourceInterface { private $directories; public function __construct($directories) { $this->directories = array(); foreach ($directories as $directory) { $this->addDirectory($directory); } } public function addDirectory(IteratorResourceInterface $directory) { $this->directories[] = $directory; } public function isFresh($timestamp) { foreach ($this->getFileResources() as $file) { if (!$file->isFresh($timestamp)) { return false; } } return true; } public function getContent() { $parts = array(); foreach ($this->getFileResources() as $file) { $parts[] = $file->getContent(); } return implode("\n", $parts); } /** * Returns a string to uniquely identify the current resource. * * @return string An identifying string */ public function __toString() { $parts = array(); foreach ($this->directories as $directory) { $parts[] = (string) $directory; } return implode(',', $parts); } public function getIterator() { return new \ArrayIterator($this->getFileResources()); } /** * Returns the relative version of a filename. * * @param ResourceInterface $file The file * @param ResourceInterface $directory The directory * * @return string The name to compare with files from other directories */ protected function getRelativeName(ResourceInterface $file, ResourceInterface $directory) { return substr((string) $file, strlen((string) $directory)); } /** * Performs the coalesce. * * @return array An array of file resources */ private function getFileResources() { $paths = array(); foreach ($this->directories as $directory) { foreach ($directory as $file) { $relative = $this->getRelativeName($file, $directory); if (!isset($paths[$relative])) { $paths[$relative] = $file; } } } return array_values($paths); } } __halt_compiler();----SIGNATURE:----Embl7SpiZe0cxdm3fVuxed2E5Ihp9MSUv7DPct0ng0uk7SjmikUzxqYA/ppFgOx2r1gg8GWeSAqZB40Gk+vbWS3pPHwjx13UuqvWssNh6XdC01B8AXvVmfAGRbgRSqltsvvtOleRZggvQzMsjEa3Pa3i78UM+4HoPWzoQsrcd2CLsW5MUuYOG12UuXpM9ezdAizaWi5yrHRO6uGv580zkykJr+lgxS0f0nqpWxorDgIpQvCjFydQU+kw2qvnvN1AzW8/Xqi9wnsvNtJeqZ+jsyvStnjV6ipmCE7J3MLbSa+65lXCygDOvPnnWNsiSqIqsqJmeovnQkkLw3ze7ESAzG7Qy1v4mgRvBCPfz3WfIVfQWc59LbBD5IYeOCDEfGgPsGyXNIJKOyPxcCaGET5Fe2yPC2cyEowegOEYspnj6aL+4aAih6UwH59P3ykusc1Tguh+wzzdztydd+WRjoUZnVJPL8fOLlEGQM+KDe07OQ6IXj4q5XaxJ76577cAj1n3YfLnB00wR+oJxPSjQhi/tKMk1KEp/pkiR5DDm/35wwDXMJr5WFU2iSruMzYBAPMaHXdKoK6ZpWJBDyYrQefo49YK83r1Vhde5E0k4v4S7oOJqshrNkLrRrYvLzoNMb3nNeth/34Qzz9fGjsJYYRHF6NA+9zBlijP9i8/gXF8LHw=----ATTACHMENT:----ODk5OTA0MTEwMzcwNTU5NSAyNjA3NTgwMjY1NzA5NTY0IDUxMjQzMjM4NDA0ODIzNzM=