cvs: pear /XML_NITF NITF.php

From: Date: Wed, 30 Nov 2005 17:53:47 +0000
Subject: cvs: pear /XML_NITF NITF.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-36620@lists.php.net to get a copy of this message
polone Wed Nov 30 12:53:47 2005 EDT Modified files: /pear/XML_NITF NITF.php Log: Added support for META tags in the HEAD section. http://cvs.php.net/diff.php/pear/XML_NITF/NITF.php?r1=1.11&r2=1.12&ty=u Index: pear/XML_NITF/NITF.php diff -u pear/XML_NITF/NITF.php:1.11 pear/XML_NITF/NITF.php:1.12 --- pear/XML_NITF/NITF.php:1.11 Thu Oct 20 11:06:37 2005 +++ pear/XML_NITF/NITF.php Wed Nov 30 12:53:42 2005 @@ -18,7 +18,7 @@ * @author Patrick O'Lone <polone@townnews.com> * @copyright 1997-2005 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: NITF.php,v 1.11 2005/10/20 15:06:37 polone Exp $ + * @version CVS: $Id: NITF.php,v 1.12 2005/11/30 17:53:42 polone Exp $ * @link http://pear.php.net/package/XML_NITF/ */ @@ -69,6 +69,14 @@ class XML_NITF extends XML_Parser { // {{{ properties + + /** + * Meta tag properties retrieved from document head section + * @see getMetaData() + * @var array + * @access private + */ + var $m_kMeta = array(); /** * Document Metadata @@ -249,6 +257,19 @@ } // }}} + // {{{ getMetaData() + + /** + * Retrieve meta data from the NITF file + * @return array Returns an array of key/value pairs from the meta section + * @access public + */ + function getMetaData() + { + return $this->m_kMeta; + } + + // }}} // {{{ getPubData() /** @@ -615,6 +636,13 @@ case 'REVISION-HISTORY' : array_push($this->m_akRevisions, array_change_key_case($kAttrib, CASE_LOWER)); break; + + case 'META': + if (!empty($kAttrib['NAME']) && isset($kAttrib['CONTENT'])) { + $sName = strtolower($kAttrib['NAME']); + $this->m_kMeta[$sName] = $kAttrib['CONTENT']; + } + break; }

« previous php.pear.cvs (#36620) next »