/** * * Returns a Binary string representing the PBI file. * @param $showtimeId * @return null|string binary string */ public function getRawQrCode($showtimeId) { $cached = $this->checkCache($showtimeId); if ($cached) { return file_get_contents($cached); } $filename = $this->getPNGQrCode($showtimeId); if ($filename) { $converter = new \ImageConverter($filename); $cacheFile = $this->cacheName($showtimeId); if ($converter->convertToPbi($cacheFile)) { return file_get_contents($cacheFile); } } return null; }