1 | <?php |
||
30 | class Iptc implements IptcInterface |
||
31 | { |
||
32 | /** |
||
33 | * @var Caption |
||
34 | */ |
||
35 | protected $caption; |
||
36 | |||
37 | /** |
||
38 | * @var Copyright |
||
39 | */ |
||
40 | protected $copyright; |
||
41 | |||
42 | /** |
||
43 | * @var Credit |
||
44 | */ |
||
45 | protected $credit; |
||
46 | |||
47 | /** |
||
48 | * @var Headline |
||
49 | */ |
||
50 | protected $headline; |
||
51 | |||
52 | /** |
||
53 | * @var Jobtitle |
||
54 | */ |
||
55 | protected $jobtitle; |
||
56 | |||
57 | /** |
||
58 | * @var Title |
||
59 | */ |
||
60 | protected $title; |
||
61 | |||
62 | /** |
||
63 | * @var Collection |
||
64 | */ |
||
65 | protected $keywords; |
||
66 | |||
67 | /** |
||
68 | * Contains the mapping of names to IPTC field numbers |
||
69 | * |
||
70 | * @var array |
||
71 | */ |
||
72 | public static $iptcMapping = array( |
||
73 | 'jobtitle' => '2#085', |
||
74 | 'source' => '2#115', |
||
75 | ); |
||
76 | |||
77 | /** |
||
78 | * {@inheritDoc} |
||
79 | */ |
||
80 | public function getHeadline() |
||
81 | { |
||
82 | return $this->headline; |
||
83 | } |
||
84 | |||
85 | /** |
||
86 | * {@inheritDoc} |
||
87 | */ |
||
88 | public function withHeadline(Headline $headline) |
||
89 | { |
||
90 | $new = clone $this; |
||
91 | $new->headline = $headline; |
||
92 | |||
93 | return $new; |
||
94 | } |
||
95 | |||
96 | /** |
||
97 | * {@inheritDoc} |
||
98 | */ |
||
99 | public function getCredit() |
||
100 | { |
||
101 | return $this->credit; |
||
102 | } |
||
103 | |||
104 | /** |
||
105 | * {@inheritDoc} |
||
106 | */ |
||
107 | public function withCredit(Credit $credit) |
||
108 | { |
||
109 | $new = clone $this; |
||
110 | $new->credit = $credit; |
||
111 | |||
112 | return $new; |
||
113 | } |
||
114 | |||
115 | /** |
||
116 | * {@inheritDoc} |
||
117 | */ |
||
118 | public function getCopyright() |
||
119 | { |
||
120 | return $this->copyright; |
||
121 | } |
||
122 | |||
123 | /** |
||
124 | * {@inheritDoc} |
||
125 | */ |
||
126 | public function withCopyright(Copyright $copyright) |
||
127 | { |
||
128 | $new = clone $this; |
||
129 | $new->copyright = $copyright; |
||
130 | |||
131 | return $new; |
||
132 | } |
||
133 | |||
134 | /** |
||
135 | * {@inheritDoc} |
||
136 | */ |
||
137 | public function getCaption() |
||
138 | { |
||
139 | return $this->caption; |
||
140 | } |
||
141 | |||
142 | /** |
||
143 | * {@inheritDoc} |
||
144 | */ |
||
145 | public function withCaption(Caption $caption) |
||
146 | { |
||
147 | $new = clone $this; |
||
148 | $new->caption = $caption; |
||
149 | |||
150 | return $new; |
||
151 | } |
||
152 | |||
153 | /** |
||
154 | * {@inheritDoc} |
||
155 | */ |
||
156 | public function getTitle() |
||
157 | { |
||
158 | return $this->title; |
||
159 | } |
||
160 | |||
161 | /** |
||
162 | * {@inheritDoc} |
||
163 | */ |
||
164 | public function withTitle(Title $title) |
||
165 | { |
||
166 | $new = clone $this; |
||
167 | $new->title = $title; |
||
168 | |||
169 | return $new; |
||
170 | } |
||
171 | |||
172 | /** |
||
173 | * {@inheritDoc} |
||
174 | */ |
||
175 | public function getKeywords() |
||
176 | { |
||
177 | return $this->keywords; |
||
178 | } |
||
179 | |||
180 | /** |
||
181 | * {@inheritDoc} |
||
182 | */ |
||
183 | public function withKeywords(Collection $keywords) |
||
184 | { |
||
185 | $new = clone $this; |
||
186 | $new->keywords = $keywords; |
||
187 | |||
188 | return $new; |
||
189 | } |
||
190 | |||
191 | /** |
||
192 | * {@inheritDoc} |
||
193 | */ |
||
194 | public function getJobtitle() |
||
198 | |||
199 | /** |
||
200 | * {@inheritDoc} |
||
201 | */ |
||
202 | public function withJobtitle(Jobtitle $jobtitle) |
||
209 | } |
||
210 |