Changeset 1019
- Timestamp:
- 11/09/07 18:16:15 (8 months ago)
- Files:
-
- trunk/src/main/php/net/stubbles/xml/stubAbstractXMLStreamWriter.php (modified) (2 diffs)
- trunk/src/main/php/net/stubbles/xml/stubDomXMLStreamWriter.php (modified) (1 diff)
- trunk/src/main/php/net/stubbles/xml/stubLibXmlXMLStreamWriter.php (modified) (1 diff)
- trunk/src/main/php/net/stubbles/xml/stubXMLStreamWriter.php (modified) (1 diff)
- trunk/src/test/php/net/stubbles/xml/stubDomXMLStreamWriterTestCase.php (modified) (1 diff)
- trunk/src/test/php/net/stubbles/xml/stubLibXmlXMLStreamWriterTestCase.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/main/php/net/stubbles/xml/stubAbstractXMLStreamWriter.php
r1018 r1019 17 17 { 18 18 /** 19 * XML version 20 * 21 * @var string 22 */ 23 protected $xmlVersion; 24 /** 19 25 * encoding used by the writer 20 26 * … … 28 34 */ 29 35 protected $features = array(); 36 37 /** 38 * returns the xml version used by the writer 39 * 40 * @return string 41 */ 42 public function getVersion() 43 { 44 return $this->xmlVersion; 45 } 30 46 31 47 /** trunk/src/main/php/net/stubbles/xml/stubDomXMLStreamWriter.php
r1018 r1019 39 39 */ 40 40 protected $elementStack = array(); 41 /**42 * XML version43 *44 * @var string45 */46 protected $xmlVersion;47 41 48 42 /** trunk/src/main/php/net/stubbles/xml/stubLibXmlXMLStreamWriter.php
r1018 r1019 31 31 */ 32 32 protected $writer; 33 /**34 * XML version35 *36 * @var string37 */38 protected $xmlVersion;39 33 40 34 /** trunk/src/main/php/net/stubbles/xml/stubXMLStreamWriter.php
r1018 r1019 38 38 */ 39 39 #public function __construct($xmlVersion = '1.0', $encoding = 'UTF-8'); 40 41 /** 42 * returns the xml version used by the writer 43 * 44 * @return string 45 */ 46 public function getVersion(); 40 47 41 48 /** trunk/src/test/php/net/stubbles/xml/stubDomXMLStreamWriterTestCase.php
r1018 r1019 24 24 $writer = new stubDomXMLStreamWriter(); 25 25 $this->assertEqual('<?xml version="1.0" encoding="UTF-8"?>', $writer->asXML()); 26 $this->assertEqual($writer->getVersion(), '1.0'); 26 27 $this->assertEqual($writer->getEncoding(), 'UTF-8'); 27 $writer = new stubDomXMLStreamWriter('1.0', 'ISO-8859-1'); 28 $writer = new stubDomXMLStreamWriter('1.1', 'ISO-8859-1'); 29 $this->assertEqual($writer->getVersion(), '1.1'); 28 30 $this->assertEqual($writer->getEncoding(), 'ISO-8859-1'); 29 31 } trunk/src/test/php/net/stubbles/xml/stubLibXmlXMLStreamWriterTestCase.php
r1018 r1019 24 24 $writer = new stubLibXmlXMLStreamWriter(); 25 25 $this->assertEqual('<?xml version="1.0" encoding="UTF-8"?>', $writer->asXML()); 26 $this->assertEqual($writer->getVersion(), '1.0'); 26 27 $this->assertEqual($writer->getEncoding(), 'UTF-8'); 27 $writer = new stubLibXmlXMLStreamWriter('1.0', 'ISO-8859-1'); 28 $writer = new stubLibXmlXMLStreamWriter('1.1', 'ISO-8859-1'); 29 $this->assertEqual($writer->getVersion(), '1.1'); 28 30 $this->assertEqual($writer->getEncoding(), 'ISO-8859-1'); 29 31 }
