Ejemplo n.º 1
0
 /** get the items array
  * @return Array XMP item configuration array.
  */
 public static function getItems()
 {
     if (!self::$ranHooks) {
         // This is for if someone makes a custom metadata extension.
         // For example, a medical wiki might want to decode DICOM xmp properties.
         wfRunHooks('XMPGetInfo', array(&self::$items));
         self::$ranHooks = true;
         // Only want to do this once.
     }
     return self::$items;
 }
Ejemplo n.º 2
0
 /**
  * Constructor.
  *
  * Primary job is to initialize the XMLParser
  */
 function __construct()
 {
     if (!function_exists('xml_parser_create_ns')) {
         // this should already be checked by this point
         throw new MWException('XMP support requires XML Parser');
     }
     $this->items = XMPInfo::getItems();
     $this->resetXMLParser();
 }
Ejemplo n.º 3
0
 /**
  * Constructor.
  *
  * Primary job is to initialize the XMLParser
  */
 function __construct(LoggerInterface $logger = null)
 {
     if (!function_exists('xml_parser_create_ns')) {
         // this should already be checked by this point
         throw new RuntimeException('XMP support requires XML Parser');
     }
     if ($logger) {
         $this->setLogger($logger);
     } else {
         $this->setLogger(new NullLogger());
     }
     $this->items = XMPInfo::getItems();
     $this->resetXMLParser();
 }