[ Index ] |
|
Code source de Horde 3.1.3 |
1 <?php 2 /** 3 * $Horde: framework/XML_WBXML/WBXML/DTD.php,v 1.6.12.5 2006/03/11 09:55:01 jan Exp $ 4 * 5 * From Binary XML Content Format Specification Version 1.3, 25 July 2001 6 * found at http://www.wapforum.org 7 * 8 * Copyright 2003-2006 Anthony Mills <amills@pyramid6.com> 9 * 10 * See the enclosed file COPYING for license information (LGPL). If you 11 * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html. 12 * 13 * @package XML_WBXML 14 */ 15 class XML_WBXML_DTD { 16 17 var $version; 18 var $intTags; 19 var $intAttributes; 20 var $strTags; 21 var $strAttributes; 22 var $intCodePages; 23 var $strCodePages; 24 var $strCodePagesURI; 25 var $URI; 26 var $XMLNS; 27 var $DPI; 28 29 function XML_WBXML_DTD($v) 30 { 31 $this->version = $v; 32 $this->init(); 33 } 34 35 function init() 36 { 37 } 38 39 function setAttribute($intAttribute, $strAttribute) 40 { 41 $this->strAttributes[$strAttribute] = $intAttribute; 42 $this->intAttributes[$intAttribute] = $strAttribute; 43 } 44 45 function setTag($intTag, $strTag) 46 { 47 $this->strTags[$strTag] = $intTag; 48 $this->intTags[$intTag] = $strTag; 49 } 50 51 function setCodePage($intCodePage, $strCodePage, $strCodePageURI) 52 { 53 $this->strCodePagesURI[$strCodePageURI] = $intCodePage; 54 $this->strCodePages[$strCodePage] = $intCodePage; 55 $this->intCodePages[$intCodePage] = $strCodePage; 56 } 57 58 function toTagStr($tag) 59 { 60 return isset($this->intTags[$tag]) ? $this->intTags[$tag] : false; 61 } 62 63 function toAttributeStr($attribute) 64 { 65 return isset($this->intTags[$attribute]) ? $this->intTags[$attribute] : false; 66 } 67 68 function toCodePageStr($codePage) 69 { 70 return isset($this->intCodePages[$codePage]) ? $this->intCodePages[$codePage] : false; 71 } 72 73 function toTagInt($tag) 74 { 75 return isset($this->strTags[$tag]) ? $this->strTags[$tag] : false; 76 } 77 78 function toAttributeInt($attribute) 79 { 80 return isset($this->strAttributes[$attribute]) ? $this->strAttributes[$attribute] : false; 81 } 82 83 function toCodePageInt($codePage) 84 { 85 return isset($this->strCodePages[$codePage]) ? $this->strCodePages[$codePage] : false; 86 } 87 88 function toCodePageURI($uri) 89 { 90 $uri = strtolower($uri); 91 if(!isset($this->strCodePagesURI[$uri])) { 92 die("unable to find codepage for $uri!\n"); 93 } 94 95 $ret = isset($this->strCodePagesURI[$uri]) ? $this->strCodePagesURI[$uri] : false; 96 97 return $ret; 98 } 99 100 /** 101 * Getter for property version. 102 * @return Value of property version. 103 */ 104 function getVersion() 105 { 106 return $this->version; 107 } 108 109 /** 110 * Setter for property version. 111 * @param integer $v New value of property version. 112 */ 113 function setVersion($v) 114 { 115 $this->version = $v; 116 } 117 118 /** 119 * Getter for property URI. 120 * @return Value of property URI. 121 */ 122 function getURI() 123 { 124 return $this->URI; 125 } 126 127 /** 128 * Setter for property URI. 129 * @param string $u New value of property URI. 130 */ 131 function setURI($u) 132 { 133 $this->URI = $u; 134 } 135 136 /** 137 * Getter for property DPI. 138 * @return Value of property DPI. 139 */ 140 function getDPI() 141 { 142 return $this->DPI; 143 } 144 145 /** 146 * Setter for property DPI. 147 * @param DPI New value of property DPI. 148 */ 149 function setDPI($d) 150 { 151 $this->DPI = $d; 152 } 153 154 }
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 |