CakePdf\Pdf\CakePdf::html PHP Method

html() public method

Get/Set Html.
public html ( null | string $html = null ) : mixed
$html null | string Html to set
return mixed
    public function html($html = null)
    {
        if ($html === null) {
            return $this->_html;
        }
        $this->_html = $html;
        return $this;
    }

Usage Example

コード例 #1
0
ファイル: DomPdfEngineTest.php プロジェクト: ceeram/cakepdf
 /**
  * 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);
 }
All Usage Examples Of CakePdf\Pdf\CakePdf::html