| [ Index ] |
|
Code source de Horde 3.1.3 |
1 <?php 2 3 include_once 'XML/WBXML/DTD/SyncML.php'; 4 include_once 'XML/WBXML/DTD/SyncMLMetInf.php'; 5 include_once 'XML/WBXML/DTD/SyncMLDevInf.php'; 6 7 /** 8 * $Horde: framework/XML_WBXML/WBXML/DTDManager.php,v 1.3.12.11 2006/05/01 12:05:15 jan Exp $ 9 * 10 * Copyright 2003-2006 Anthony Mills <amills@pyramid6.com> 11 * 12 * See the enclosed file COPYING for license information (LGPL). If you 13 * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html. 14 * 15 * From Binary XML Content Format Specification Version 1.3, 25 July 16 * 2001 found at http://www.wapforum.org 17 * 18 * @package XML_WBXML 19 */ 20 class XML_WBXML_DTDManager { 21 22 /** 23 * @var array 24 */ 25 var $_strDTD = array(); 26 27 /** 28 * @var array 29 */ 30 var $_strDTDURI = array(); 31 32 /** 33 */ 34 function XML_WBXML_DTDManager() 35 { 36 $this->registerDTD('-//SYNCML//DTD SyncML 1.0//EN', 'syncml:syncml1.0', new XML_WBXML_DTD_SyncML(0)); 37 $this->registerDTD('-//SYNCML//DTD SyncML 1.1//EN', 'syncml:syncml1.1', new XML_WBXML_DTD_SyncML(1)); 38 39 $this->registerDTD('-//SYNCML//DTD MetInf 1.0//EN', 'syncml:metinf1.0', new XML_WBXML_DTD_SyncMLMetInf(0)); 40 $this->registerDTD('-//SYNCML//DTD MetInf 1.1//EN', 'syncml:metinf1.1', new XML_WBXML_DTD_SyncMLMetInf(1)); 41 42 $this->registerDTD('-//SYNCML//DTD DevInf 1.0//EN', 'syncml:devinf1.0', new XML_WBXML_DTD_SyncMLDevInf(0)); 43 $this->registerDTD('-//SYNCML//DTD DevInf 1.1//EN', 'syncml:devinf1.1', new XML_WBXML_DTD_SyncMLDevInf(1)); 44 } 45 46 /** 47 */ 48 function &getInstance($publicIdentifier) 49 { 50 $publicIdentifier = strtolower($publicIdentifier); 51 if (isset($this->_strDTD[$publicIdentifier])) { 52 $dtd = &$this->_strDTD[$publicIdentifier]; 53 } else { 54 $dtd = null; 55 } 56 return $dtd; 57 } 58 59 /** 60 */ 61 function &getInstanceURI($uri) 62 { 63 $uri = strtolower($uri); 64 65 // some manual hacks: 66 if ($uri == 'syncml:syncml') { 67 $uri = 'syncml:syncml1.0'; 68 } 69 if ($uri == 'syncml:metinf') { 70 $uri = 'syncml:metinf1.0'; 71 } 72 if ($uri == 'syncml:devinf') { 73 $uri = 'syncml:devinf1.0'; 74 } 75 76 if (isset($this->_strDTDURI[$uri])) { 77 $dtd = &$this->_strDTDURI[$uri]; 78 } else { 79 $dtd = null; 80 } 81 return $dtd; 82 } 83 84 /** 85 */ 86 function registerDTD($publicIdentifier, $uri, &$dtd) 87 { 88 $publicIdentifier = strtolower($publicIdentifier); 89 $dtd->setDPI($publicIdentifier); 90 91 $this->_strDTD[$publicIdentifier] = $dtd; 92 $this->_strDTDURI[strtolower($uri)] = $dtd; 93 } 94 95 }
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
| Généré le : Sun Feb 25 18:01:28 2007 | par Balluche grâce à PHPXref 0.7 |