Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2declare(strict_types=1);
3/**
4 * Pop PHP Framework (https://www.popphp.org/)
5 *
6 * @link       https://github.com/popphp/popphp-framework
7 * @author     Nick Sagona, III <nick@popphp.org>
8 * @copyright  Copyright (c) 2009-2026 Nick Sagona, III
9 * @license    https://www.popphp.org/license     New BSD License
10 */
11
12/**
13 * @namespace
14 */
15namespace Pop\Pdf\Build;
16
17use Pop\Pdf\Document;
18
19/**
20 * Compiler interface
21 *
22 * @category   Pop
23 * @package    Pop\Pdf
24 * @author     Nick Sagona, III <nick@popphp.org>
25 * @copyright  Copyright (c) 2009-2026 Nick Sagona, III
26 * @license    https://www.popphp.org/license     New BSD License
27 * @version    6.0.0
28 */
29interface CompilerInterface
30{
31
32    /**
33     * Get the document object
34     *
35     * @return ?Document
36     */
37    public function getDocument(): ?Document;
38
39    /**
40     * Get the root object
41     *
42     * @return ?PdfObject\RootObject
43     */
44    public function getRoot(): ?PdfObject\RootObject;
45
46    /**
47     * Get the parent object
48     *
49     * @return ?PdfObject\ParentObject
50     */
51    public function getParent(): ?PdfObject\ParentObject;
52
53    /**
54     * Get the info object
55     *
56     * @return ?PdfObject\InfoObject
57     */
58    public function getInfo(): ?PdfObject\InfoObject;
59
60    /**
61     * Return the last object index.
62     *
63     * @return int
64     */
65    public function lastIndex(): int;
66
67    /**
68     * Get the compiled output
69     *
70     * @return string
71     */
72    public function getOutput(): string;
73
74    /**
75     * Set the document object
76     *
77     * @param  Document $document
78     * @return Compiler
79     */
80    public function setDocument(Document $document): Compiler;
81
82    /**
83     * Compile and finalize the PDF document
84     *
85     * @param  Document $document
86     * @return void
87     */
88    public function finalize(Document $document): void;
89
90}