Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
21 / 21
100.00% covered (success)
100.00%
14 / 14
CRAP
100.00% covered (success)
100.00%
1 / 1
Metadata
100.00% covered (success)
100.00%
21 / 21
100.00% covered (success)
100.00%
14 / 14
14
100.00% covered (success)
100.00%
1 / 1
 setTitle
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 setAuthor
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 setSubject
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 setCreator
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 setProducer
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 setCreationDate
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 setModDate
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getTitle
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getAuthor
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getSubject
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getCreator
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getProducer
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getCreationDate
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getModDate
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
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\Document;
16
17/**
18 * Pdf document metadata class
19 *
20 * @category   Pop
21 * @package    Pop\Pdf
22 * @author     Nick Sagona, III <nick@popphp.org>
23 * @copyright  Copyright (c) 2009-2026 Nick Sagona, III
24 * @license    https://www.popphp.org/license     New BSD License
25 * @version    6.0.0
26 */
27class Metadata
28{
29
30    /**
31     * PDF info object title
32     * @var string
33     */
34    protected string $title = 'Pop PDF';
35
36    /**
37     * PDF info object author
38     * @var string
39     */
40    protected string $author = 'Pop PDF';
41
42    /**
43     * PDF info object subject
44     * @var string
45     */
46    protected string $subject = 'Pop PDF';
47
48    /**
49     * PDF info object creator
50     * @var string
51     */
52    protected string $creator = 'Pop PDF';
53
54    /**
55     * PDF info object producer
56     * @var string
57     */
58    protected string $producer = 'Pop PDF';
59
60    /**
61     * PDF info object creation date
62     * @var ?string
63     */
64    protected ?string $creationDate = null;
65
66    /**
67     * PDF info object modification date
68     * @var ?string
69     */
70    protected ?string $modDate = null;
71
72    /**
73     * Set the info object title
74     *
75     * @param  string $title
76     * @return Metadata
77     */
78    public function setTitle(string $title): Metadata
79    {
80        $this->title = $title;
81        return $this;
82    }
83
84    /**
85     * Set the info object author
86     *
87     * @param  string $author
88     * @return Metadata
89     */
90    public function setAuthor(string $author): Metadata
91    {
92        $this->author = $author;
93        return $this;
94    }
95
96    /**
97     * Set the info object subject
98     *
99     * @param  string $subject
100     * @return Metadata
101     */
102    public function setSubject(string $subject): Metadata
103    {
104        $this->subject = $subject;
105        return $this;
106    }
107
108    /**
109     * Set the info object creator
110     *
111     * @param  string $creator
112     * @return Metadata
113     */
114    public function setCreator(string $creator): Metadata
115    {
116        $this->creator = $creator;
117        return $this;
118    }
119
120    /**
121     * Set the info object producer
122     *
123     * @param  string $producer
124     * @return Metadata
125     */
126    public function setProducer(string $producer): Metadata
127    {
128        $this->producer = $producer;
129        return $this;
130    }
131
132    /**
133     * Set the info object creation date
134     *
135     * @param  string $date
136     * @return Metadata
137     */
138    public function setCreationDate(string $date): Metadata
139    {
140        $this->creationDate = $date;
141        return $this;
142    }
143
144    /**
145     * Set the info object modification date
146     *
147     * @param  string $date
148     * @return Metadata
149     */
150    public function setModDate(string $date): Metadata
151    {
152        $this->modDate = $date;
153        return $this;
154    }
155
156    /**
157     * Get the info object title
158     *
159     * @return string
160     */
161    public function getTitle(): string
162    {
163        return $this->title;
164    }
165
166    /**
167     * Get the info object author
168     *
169     * @return string
170     */
171    public function getAuthor(): string
172    {
173        return $this->author;
174    }
175
176    /**
177     * Get the info object subject
178     *
179     * @return string
180     */
181    public function getSubject(): string
182    {
183        return $this->subject;
184    }
185
186    /**
187     * Get the info object creator
188     *
189     * @return string
190     */
191    public function getCreator(): string
192    {
193        return $this->creator;
194    }
195
196    /**
197     * Get the info object producer
198     *
199     * @return string
200     */
201    public function getProducer(): string
202    {
203        return $this->producer;
204    }
205
206    /**
207     * Get the info object creation date
208     *
209     * @return ?string
210     */
211    public function getCreationDate(): ?string
212    {
213        return $this->creationDate;
214    }
215
216    /**
217     * Get the info object modification date
218     *
219     * @return ?string
220     */
221    public function getModDate(): ?string
222    {
223        return $this->modDate;
224    }
225
226}