aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio <s1lv10@uol.com.br>2010-04-26 16:21:51 -0300
committerSilvio <s1lv10@uol.com.br>2010-04-26 16:21:51 -0300
commit460d97857d33baeeed00abdc3c4241ba3b279135 (patch)
tree0052d5953c069265db307650f3da4450cfc30206
parentcd206a43bcfc3197fc373636e9b7ab0c98aa7239 (diff)
downloadexif-460d97857d33baeeed00abdc3c4241ba3b279135.tar.gz
exif-460d97857d33baeeed00abdc3c4241ba3b279135.tar.bz2
Using URI for namespace configuration
-rw-r--r--exif.class.php33
1 files changed, 15 insertions, 18 deletions
diff --git a/exif.class.php b/exif.class.php
index 944ac9d..9ab080f 100644
--- a/exif.class.php
+++ b/exif.class.php
@@ -204,18 +204,15 @@ Class Exif {
// Sort.
$xmpmeta->Sort();
- // Get namespace.
- $ns = $xmpmeta->GetNamespaceURI($config['ns']);
-
// Read XMP data.
if ($config['type'] == 'property') {
- $value = $xmpmeta->GetProperty($config['name'], $ns);
+ $value = $xmpmeta->GetProperty($config['name'], $config['ns']);
}
elseif ($config['type'] == 'array') {
- $value = $xmpmeta->GetArrayItem($config['name'], $key, $ns);
+ $value = $xmpmeta->GetArrayItem($config['name'], $key, $config['ns']);
}
elseif ($config['type'] == 'struct') {
- $value = $xmpmeta->GetStructField($ns, $config['struct'], $ns, $config['name']);
+ $value = $xmpmeta->GetStructField($config['ns'], $config['struct'], $config['ns'], $config['name']);
}
return $value;
@@ -303,60 +300,60 @@ Class Exif {
return array(
'headline' => array(
'name' => 'Headline',
- 'ns' => 'photoshop',
+ 'ns' => 'http://ns.adobe.com/photoshop/1.0/',
'type' => 'property',
),
'authorsposition' => array(
'name' => 'AuthorsPosition',
- 'ns' => 'photoshop',
+ 'ns' => 'http://ns.adobe.com/photoshop/1.0/',
'type' => 'property',
),
'instructions' => array(
'name' => 'Instructions',
- 'ns' => 'photoshop',
+ 'ns' => 'http://ns.adobe.com/photoshop/1.0/',
'type' => 'property',
),
'subject' => array(
'name' => 'subject',
- 'ns' => 'dc',
+ 'ns' => 'http://purl.org/dc/elements/1.1/',
'type' => 'array',
),
'description' => array(
'name' => 'description',
- 'ns' => 'dc',
+ 'ns' => 'http://purl.org/dc/elements/1.1/',
'type' => 'array',
),
'creator' => array(
'name' => 'creator',
- 'ns' => 'dc',
+ 'ns' => 'http://purl.org/dc/elements/1.1/',
'type' => 'array',
),
'rights' => array(
'name' => 'rights',
- 'ns' => 'dc',
+ 'ns' => 'http://purl.org/dc/elements/1.1/',
'type' => 'array',
),
'ciadrextadr' => array(
'name' => 'CiAdrExtadr',
- 'ns' => 'Iptc4XmpCore',
+ 'ns' => 'http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/',
'type' => 'struct',
'struct' => 'CreatorContactInfo',
),
'ciemailwork' => array(
'name' => 'CiEmailWork',
- 'ns' => 'Iptc4XmpCore',
+ 'ns' => 'http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/',
'type' => 'struct',
'struct' => 'CreatorContactInfo',
),
'ciurlwork' => array(
'name' => 'CiUrlWork',
- 'ns' => 'Iptc4XmpCore',
+ 'ns' => 'http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/',
'type' => 'struct',
'struct' => 'CreatorContactInfo',
),
'scene' => array(
'name' => 'Scene',
- 'ns' => 'Iptc4XmpCore',
+ 'ns' => 'http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/',
'type' => 'array',
),
'hierarchicalsubject' => array(
@@ -366,7 +363,7 @@ Class Exif {
),
'location' => array(
'name' => 'Location',
- 'ns' => 'Iptc4XmpCore',
+ 'ns' => 'http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/',
'type' => 'property',
),
);