@@ -195,34 +195,34 @@ protected function loadXmp(string $file): CData
195195 }
196196
197197 /**
198- * Returns an array of arrays containing the "raw" XMP properties matching the provided schema and property name.
198+ * Returns an array of arrays containing the "raw" XMP properties matching the provided namespace and property name.
199199 *
200- * @return array<array{'schema ': string, 'options': int, 'name': string, 'value': string}>
200+ * @return array<array{'namespace ': string, 'options': int, 'name': string, 'value': string}>
201201 */
202- protected function getRawProperties (?string $ schema , ?string $ propertyName ): array
202+ protected function getRawProperties (?string $ namespace , ?string $ propertyName ): array
203203 {
204204 $ properties = [];
205205
206- $ iterator = static ::$ ffi ->xmp_iterator_new ($ this ->xmp , $ schema , $ propertyName , 0 );
206+ $ iterator = static ::$ ffi ->xmp_iterator_new ($ this ->xmp , $ namespace , $ propertyName , 0 );
207207
208208 if ($ iterator === null ) {
209209 return $ properties ;
210210 }
211211
212- $ schemaString = static ::$ ffi ->xmp_string_new ();
212+ $ namespaceString = static ::$ ffi ->xmp_string_new ();
213213 $ nameString = static ::$ ffi ->xmp_string_new ();
214214 $ valueString = static ::$ ffi ->xmp_string_new ();
215215
216216 $ options = static ::$ ffi ->new ('int ' );
217217
218218 while (static ::$ ffi ->xmp_iterator_next (
219219 $ iterator ,
220- $ schemaString ,
220+ $ namespaceString ,
221221 $ nameString ,
222222 $ valueString ,
223223 FFI ::addr ($ options )
224224 ) === 1 ) {
225- $ schema = static ::$ ffi ->xmp_string_cstr ($ schemaString );
225+ $ namespace = static ::$ ffi ->xmp_string_cstr ($ namespaceString );
226226 $ name = static ::$ ffi ->xmp_string_cstr ($ nameString );
227227 $ value = static ::$ ffi ->xmp_string_cstr ($ valueString );
228228
@@ -231,14 +231,14 @@ protected function getRawProperties(?string $schema, ?string $propertyName): arr
231231 }
232232
233233 $ properties [$ name ] = [
234- 'schema ' => $ schema ,
234+ 'namespace ' => $ namespace ,
235235 'options ' => (int ) $ options ->cdata ,
236236 'name ' => $ name ,
237237 'value ' => $ value ,
238238 ];
239239 }
240240
241- static ::$ ffi ->xmp_string_free ($ schemaString );
241+ static ::$ ffi ->xmp_string_free ($ namespaceString );
242242 static ::$ ffi ->xmp_string_free ($ nameString );
243243 static ::$ ffi ->xmp_string_free ($ valueString );
244244
@@ -250,37 +250,37 @@ protected function getRawProperties(?string $schema, ?string $propertyName): arr
250250 /**
251251 * Returns an array where the "raw" XMP properties have been hydrated to DTO objects.
252252 *
253- * @param array<array{'schema ': string, 'options': int, 'name': string, 'value': string}> $properties
253+ * @param array<array{'namespace ': string, 'options': int, 'name': string, 'value': string}> $properties
254254 * @return array<ArrayProperty|QualifierProperty|StructProperty|ValueProperty>
255255 */
256256 protected function hydrate (array $ properties ): array
257257 {
258258 foreach ($ properties as &$ property ) {
259259 if ($ property ['options ' ] & Type::ARRAY ->value ) {
260260 $ property = new ArrayProperty (
261- $ property ['schema ' ],
261+ $ property ['namespace ' ],
262262 $ property ['options ' ],
263263 $ property ['name ' ]
264264 );
265265 }
266266 elseif ($ property ['options ' ] & Type::QUALIFIER ->value ) {
267267 $ property = new QualifierProperty (
268- $ property ['schema ' ],
268+ $ property ['namespace ' ],
269269 $ property ['options ' ],
270270 $ property ['name ' ],
271271 $ property ['value ' ]
272272 );
273273 }
274274 elseif ($ property ['options ' ] & Type::STRUCT ->value ) {
275275 $ property = new StructProperty (
276- $ property ['schema ' ],
276+ $ property ['namespace ' ],
277277 $ property ['options ' ],
278278 $ property ['name ' ]
279279 );
280280 }
281281 else {
282282 $ property = new ValueProperty (
283- $ property ['schema ' ],
283+ $ property ['namespace ' ],
284284 $ property ['options ' ],
285285 $ property ['name ' ],
286286 $ property ['value ' ]
@@ -378,17 +378,17 @@ public function getXml(): string
378378 }
379379
380380 /**
381- * Returns an array contaning all properties matching the provided schema and property name.
381+ * Returns an array contaning all properties matching the provided namespace and property name.
382382 *
383383 * @return array<ArrayProperty|StructProperty|ValueProperty>
384384 */
385- public function getProperties (?string $ schema = null , ?string $ propertyName = null ): array
385+ public function getProperties (?string $ namespace = null , ?string $ propertyName = null ): array
386386 {
387- return $ this ->nest ($ this ->hydrate ($ this ->getRawProperties ($ schema , $ propertyName )));
387+ return $ this ->nest ($ this ->hydrate ($ this ->getRawProperties ($ namespace , $ propertyName )));
388388 }
389389
390390 /**
391- * Returns the property matching the provided schema and property name.
391+ * Returns the property matching the provided namespace and property name.
392392 */
393393 public function getProperty (string $ namespace , string $ propertyName ): null |ArrayProperty |StructProperty |ValueProperty
394394 {
0 commit comments