html() публичный Метод

Get/Set Html.
public html ( null | string $html = null ) : mixed
$html null | string Html to set
Результат mixed
Пример #1
0
 /**
  * Tests generating actual output.
  */
 public function testOutput()
 {
     $Pdf = new CakePdf(['engine' => 'CakePdf.Dompdf']);
     $Pdf->html('<foo>bar</foo>');
     $output = $Pdf->engine()->output();
     $this->assertStringStartsWith('%PDF-1.3', $output);
     $this->assertStringEndsWith("%%EOF\n", $output);
 }
Пример #2
0
 /**
  * Renders the Dompdf instance.
  *
  * @param CakePdf $Pdf The CakePdf instance that supplies the content to render.
  * @param Dompdf $DomPDF The Dompdf instance to render.
  * @return Dompdf
  */
 protected function _render($Pdf, $DomPDF)
 {
     $DomPDF->loadHtml($Pdf->html());
     $DomPDF->render();
     return $DomPDF;
 }