/** * @see Html2Pdf::save() * @param string $file * @return mixed|void */ public function save($file) { if (!class_exists('\\DOMPDF')) { } $pdfs = array(); foreach ($this->_html as $i => $page) { $f = '/tmp/' . StringUtils::randString(10); $pdf = new \DOMPDF(); $pdf->load_html($page); $pdf->render(); file_put_contents("{$f}.pdf", $pdf->output()); $pdfs[] = "{$f}.pdf"; } $pdfMerge = Merge::factory($this->_page['merge'], $pdfs); $pdfMerge->save($file); }
/** * @param $aPatient * @param $bPatient * @param $pid * @param $mrg */ protected function MergeHandler($aPatient, $bPatient, $pid, $mrg) { if ($aPatient === false) { $this->ackStatus = 'AR'; $this->ackMessage = 'Unable to find primary patient - ' . $pid; return; } elseif ($bPatient === false) { $this->ackStatus = 'AR'; $this->ackMessage = 'Unable to find merge patient - ' . $mrg; return; } $merge = new Merge(); $success = $merge->merge($aPatient['pid'], $bPatient['pid']); unset($merge); if ($success === false) { $this->ackStatus = 'AR'; $this->ackMessage = 'Unable to merge patient ' . $aPatient['pid'] . ' <= ' . $bPatient['pid']; unset($aPatient, $bPatient); return; } unset($aPatient, $bPatient); }
/** * Merges this translation with other translation. * * @param Translation $translation The translation to merge with * @param int $options * * @return self */ public function mergeWith(Translation $translation, $options = Merge::DEFAULTS) { Merge::mergeTranslation($translation, $this, $options); Merge::mergeReferences($translation, $this, $options); Merge::mergeComments($translation, $this, $options); Merge::mergeExtractedComments($translation, $this, $options); Merge::mergeFlags($translation, $this, $options); return $this; }