Changeset 322 for cleversvg

Show
Ignore:
Timestamp:
02/26/08 23:29:20 (4 years ago)
Author:
nperriault
Message:

refs #40 + modified visibility of some methods (hey, that's alpha, dudes)

Location:
cleversvg/trunk
Files:
2 added
3 modified

Legend:

Unmodified
Added
Removed
  • cleversvg/trunk/document/csDocument.class.php

    r321 r322  
    7878   * @return array 
    7979   */ 
    80   public function getElements() 
     80  protected function getElements() 
    8181  { 
    8282    return $this->elements; 
     
    8686   * Gets the namespace prefix if this is an embedded document 
    8787   * 
    88    * @return stringPie 
    89    */ 
    90   public function getNodeNS() 
     88   * @return string 
     89   */ 
     90  protected function getNodeNS() 
    9191  { 
    9292    $prefix = ''; 
     
    179179   * @return array 
    180180   */ 
    181   public function getDefinitions() 
     181  protected function getDefinitions() 
    182182  { 
    183183    return $this->definitions; 
     
    189189   * @return array 
    190190   */ 
    191   public function getUsedDefinitions() 
     191  protected function getUsedDefinitions() 
    192192  { 
    193193    return $this->used_definitions; 
     
    199199   * @return array 
    200200   */ 
    201   public function getDefinition($id) 
     201  protected function getDefinition($id) 
    202202  { 
    203203    if (!isset($this->definitions[$id])) 
     
    213213 
    214214  /** 
    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 ? 
    217218   * @return DOMDocument 
    218219   */ 
    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) 
    222223    { 
    223224      return $this->dom_document; 
     
    287288   * Checks if a DOM id already exists in current SVG Document 
    288289   * 
     290   * @param  string  $dom_id 
    289291   * @return boolean 
    290292   */ 
     
    299301   * 
    300302   */ 
    301   public function initDefaults() 
     303  protected function initDefaults() 
    302304  { 
    303305    if (!array_key_exists('xmlns', $this->attributes)) 
     
    454456    $xml_prepend = ''; 
    455457 
    456     $dom = $this->getDomDocument(); 
     458    $dom = $this->getDomDocument(true); 
    457459 
    458460    // External stylesheets 
     
    660662   * @throws csException 
    661663   */ 
    662   public function validate(DOMDocument $dom) 
     664  protected function validate(DOMDocument $dom) 
    663665  { 
    664666    if (true == $this->strict_mode && !$dom->validate()) 
  • cleversvg/trunk/elements/csGroup.class.php

    r318 r322  
    8484   * @return array  
    8585   */ 
    86   public function getElements() 
     86  protected function getElements() 
    8787  { 
    8888    return $this->elements; 
  • cleversvg/trunk/elements/csLink.class.php

    r318 r322  
    6464   * @return array  
    6565   */ 
    66   public function getElements() 
     66  protected function getElements() 
    6767  { 
    6868    return $this->elements;