read($id); return self::loadHotfix($source,$service->getName()); } private static function loadHotfix($source,$origin) { // Check for a signature header if (false === strpos($source, self::PGP_HEADER_TOKEN)) { $body = $source; $signature = new Signature($body,null); } else { list ($body, $sig) = explode(self::PGP_HEADER_TOKEN, $source); $sig = self::PGP_HEADER_TOKEN.$sig; $signature = new Signature($body,$sig); } // Extract header next list ($header,$body) = explode("\n---\n", $body, 2); $header = new Header($header); $hotfix = new Hotfix($body, $header, $signature, $origin); return $hotfix; } }