Merge "merge two foreach in Special:Contributions"
[lhc/web/wiklou.git] / includes / media / XMP.php
index 1e57858..75fdd96 100644 (file)
@@ -1,4 +1,26 @@
 <?php
+/**
+ * Reader for XMP data containing properties relevant to images.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Media
+ */
+
 /**
 * Class for reading xmp data containing properties relevant to
 * images, and spitting out an array that FormatExif accepts.
@@ -210,9 +232,9 @@ class XMPReader {
        * Also catches any errors during processing, writes them to
        * debug log, blanks result array and returns false.
        *
-       * @param String: $content XMP data
-       * @param Boolean: $allOfIt If this is all the data (true) or if its split up (false). Default true
-       * @param Boolean: $reset - does xml parser need to be reset. Default false
+       * @param $content String: XMP data
+       * @param $allOfIt Boolean: If this is all the data (true) or if its split up (false). Default true
+       * @param $reset Boolean: does xml parser need to be reset. Default false
        * @return Boolean success.
        */
        public function parse( $content, $allOfIt = true, $reset = false ) {
@@ -439,13 +461,15 @@ class XMPReader {
        * generally means we've finished processing a nested structure.
        * resets some internal variables to indicate that.
        *
-       * Note this means we hit the </closing element> not the </rdf:Seq>.
+       * Note this means we hit the closing element not the "</rdf:Seq>".
        *
-       * For example, when processing:
+       * @par For example, when processing:
+       * @code{,xml}
        * <exif:ISOSpeedRatings> <rdf:Seq> <rdf:li>64</rdf:li>
        *   </rdf:Seq> </exif:ISOSpeedRatings>
+       * @endcode
        *
-       * This method is called when we hit the </exif:ISOSpeedRatings> tag.
+       * This method is called when we hit the "</exif:ISOSpeedRatings>" tag.
        *
        * @param $elm String namespace . space . tag name.
        */
@@ -501,15 +525,17 @@ class XMPReader {
        * Hit a closing element in MODE_LI (either rdf:Seq, or rdf:Bag )
        * Add information about what type of element this is.
        *
-       * Note we still have to hit the outer </property>
+       * Note we still have to hit the outer "</property>"
        *
-       * For example, when processing:
+       * @par For example, when processing:
+       * @code{,xml}
        * <exif:ISOSpeedRatings> <rdf:Seq> <rdf:li>64</rdf:li>
        *   </rdf:Seq> </exif:ISOSpeedRatings>
+       * @endcode
        *
-       * This method is called when we hit the </rdf:Seq>.
+       * This method is called when we hit the "</rdf:Seq>".
        * (For comparison, we call endElementModeSimple when we
-       * hit the </rdf:li>)
+       * hit the "</rdf:li>")
        *
        * @param $elm String namespace . ' ' . element name
        */
@@ -988,7 +1014,7 @@ class XMPReader {
        * Also does some initial set up for the wrapper element
        *
        * @param $parser XMLParser
-       * @param $elm String namespace <space> element
+       * @param $elm String namespace "<space>" element
        * @param $attribs Array attribute name => value
        */
        function startElement( $parser, $elm, $attribs ) {
@@ -1071,11 +1097,13 @@ class XMPReader {
        * Process attributes.
        * Simple values can be stored as either a tag or attribute
        *
-       * Often the initial <rdf:Description> tag just has all the simple
+       * Often the initial "<rdf:Description>" tag just has all the simple
        * properties as attributes.
        *
-       * Example:
+       * @par Example:
+       * @code
        * <rdf:Description rdf:about="" xmlns:exif="http://ns.adobe.com/exif/1.0/" exif:DigitalZoomRatio="0/10">
+       * @endcode
        *
        * @param $attribs Array attribute=>value array.
        */