public function getName($old_name=null) {
    // return existing old name
    if($old_name && property_exists($this->existing, $old_name)) {
      return $this->existing->{$old_name};
    }

    // get next name
    $name = $this->prefix . $this->counter;
    $this->counter += 1;

    // save mapping
    if($old_name !== null) {
      $this->existing->{$old_name} = $name;
      $this->order[] = $old_name;
    }

    return $name;
  }
public function getName($old_name=null) {
    // return existing old name
    if($old_name && property_exists($this->existing, $old_name)) {
      return $this->existing->{$old_name};
    }

    // get next name
    $name = $this->prefix . $this->counter;
    $this->counter += 1;

    // save mapping
    if($old_name !== null) {
      $this->existing->{$old_name} = $name;
      $this->order[] = $old_name;
    }

    return $name;
  }
public function getName ( $ old_name = null ) { // return existing old name if ( $ old_name && property_exists ( $ this -> existing , $ old_name ) ) { return $ this -> existing -> { $ old_name } ; } // get next name $ name = $ this -> prefix . $ this -> counter ; $ this -> counter += 1 ; // save mapping if ( $ old_name !== null ) { $ this -> existing -> { $ old_name } = $ name ; $ this -> order [ ] = $ old_name ; } return $ name ; }
Gets the new name for the given old name, where if no old name is given
a new name will be generated.

@param mixed [$old_name] the old name to get the new name for.

@return string the new name.
Gets the new name for the given old name where if no old name is given a new name will be generated .