コード例 #1
0
 /**
  * @param \PhantomPdf\Options $options
  *
  * @return \PhantomPdf\Options
  */
 protected function prepareHeaderAndFooter(Options $options)
 {
     if ($options->getHeaderContent() !== null) {
         $headerPath = $this->putContentToTmpFile($options->getHeaderContent());
         $options->setHeaderPath($headerPath);
         $options->setHeaderContent(null);
     }
     if ($options->getFooterContent() !== null) {
         $footerPath = $this->putContentToTmpFile($options->getFooterContent());
         $options->setFooterPath($footerPath);
         $options->setFooterContent(null);
     }
     return $options;
 }