- Timestamp:
- 02/26/08 23:29:20 (4 years ago)
- Location:
- cleversvg/trunk
- Files:
-
- 2 added
- 3 modified
-
document/csDocument.class.php (modified) (10 diffs)
-
elements/csGroup.class.php (modified) (1 diff)
-
elements/csLink.class.php (modified) (1 diff)
-
tests (added)
-
tests/csDocumentTest.php (added)
Legend:
- Unmodified
- Added
- Removed
-
cleversvg/trunk/document/csDocument.class.php
r321 r322 78 78 * @return array 79 79 */ 80 p ublicfunction getElements()80 protected function getElements() 81 81 { 82 82 return $this->elements; … … 86 86 * Gets the namespace prefix if this is an embedded document 87 87 * 88 * @return string Pie89 */ 90 p ublicfunction getNodeNS()88 * @return string 89 */ 90 protected function getNodeNS() 91 91 { 92 92 $prefix = ''; … … 179 179 * @return array 180 180 */ 181 p ublicfunction getDefinitions()181 protected function getDefinitions() 182 182 { 183 183 return $this->definitions; … … 189 189 * @return array 190 190 */ 191 p ublicfunction getUsedDefinitions()191 protected function getUsedDefinitions() 192 192 { 193 193 return $this->used_definitions; … … 199 199 * @return array 200 200 */ 201 p ublicfunction getDefinition($id)201 protected function getDefinition($id) 202 202 { 203 203 if (!isset($this->definitions[$id])) … … 213 213 214 214 /** 215 * Returns current DOMDOcument 216 * 215 * Returns DOMDocument instance for SVG current document 216 * 217 * @param boolean $new Shall we force creating a new empty DOMDocument ? 217 218 * @return DOMDocument 218 219 */ 219 public function getDomDocument( )220 { 221 if ( $this->dom_document instanceof DOMDocument)220 public function getDomDocument($new = false) 221 { 222 if (!$new && $this->dom_document instanceof DOMDocument) 222 223 { 223 224 return $this->dom_document; … … 287 288 * Checks if a DOM id already exists in current SVG Document 288 289 * 290 * @param string $dom_id 289 291 * @return boolean 290 292 */ … … 299 301 * 300 302 */ 301 p ublicfunction initDefaults()303 protected function initDefaults() 302 304 { 303 305 if (!array_key_exists('xmlns', $this->attributes)) … … 454 456 $xml_prepend = ''; 455 457 456 $dom = $this->getDomDocument( );458 $dom = $this->getDomDocument(true); 457 459 458 460 // External stylesheets … … 660 662 * @throws csException 661 663 */ 662 p ublicfunction validate(DOMDocument $dom)664 protected function validate(DOMDocument $dom) 663 665 { 664 666 if (true == $this->strict_mode && !$dom->validate()) -
cleversvg/trunk/elements/csGroup.class.php
r318 r322 84 84 * @return array 85 85 */ 86 p ublicfunction getElements()86 protected function getElements() 87 87 { 88 88 return $this->elements; -
cleversvg/trunk/elements/csLink.class.php
r318 r322 64 64 * @return array 65 65 */ 66 p ublicfunction getElements()66 protected function getElements() 67 67 { 68 68 return $this->elements;
