* Note XMP kind of looks like rdf. They are not the same thing - XMP is
* encoded as a specific subset of rdf. This class can read XMP. It cannot
* read rdf.
- *
*/
class XMPReader implements LoggerAwareInterface {
/** @var array XMP item configuration array */
* <exif:DigitalZoomRatio>0/10</exif:DigitalZoomRatio>
* and are processing the 0/10 bit.
*
- * @param XMLParser $parser XMLParser reference to the xml parser
+ * @param resource $parser XMLParser reference to the xml parser
* @param string $data Character data
* @throws RuntimeException On invalid data
*/
private function endElementNested( $elm ) {
/* cur item must be the same as $elm, unless if in MODE_STRUCT
- in which case it could also be rdf:Description */
+ * in which case it could also be rdf:Description */
if ( $this->curItem[0] !== $elm
&& !( $elm === self::NS_RDF . ' Description'
&& $this->mode[0] === self::MODE_STRUCT )
* Ignores the outer wrapping elements that are optional in
* xmp and have no meaning.
*
- * @param XMLParser $parser
+ * @param resource $parser
* @param string $elm Namespace . ' ' . element name
* @throws RuntimeException
*/
if ( $elm === self::NS_RDF . ' Seq' ) {
array_unshift( $this->mode, self::MODE_LI );
} elseif ( $elm === self::NS_RDF . ' Bag' ) {
- # bug 27105
+ # T29105
$this->logger->info( __METHOD__ . ' Expected an rdf:Seq, but got an rdf:Bag. Pretending'
. ' it is a Seq, since some buggy software is known to screw this up.' );
array_unshift( $this->mode, self::MODE_LI );
* Called when processing the <rdf:value> or <foo:someQualifier>.
*
* @param string $elm Namespace and tag name separated by a space.
- *
*/
private function startElementModeQDesc( $elm ) {
if ( $elm === self::NS_RDF . ' value' ) {
}
} else {
array_unshift( $this->mode, self::MODE_IGNORE );
- array_unshift( $this->curItem, $elm );
+ array_unshift( $this->curItem, $ns . ' ' . $tag );
return;
}
* Generally just calls a helper based on what MODE we're in.
* Also does some initial set up for the wrapper element
*
- * @param XMLParser $parser
+ * @param resource $parser
* @param string $elm Namespace "<space>" element
* @param array $attribs Attribute name => value
* @throws RuntimeException