public function getUniqueName($name)
    {
        if (!isset($this->registry[$name])) {
            $this->registry[$name] = 0;

            return $name;
        }

        ++$this->registry[$name];

        return sprintf('%s_%s', $name, $this->registry[$name]);
    }
public function getUniqueName($name)
    {
        if (!isset($this->registry[$name])) {
            $this->registry[$name] = 0;

            return $name;
        }

        ++$this->registry[$name];

        return sprintf('%s_%s', $name, $this->registry[$name]);
    }
public function getUniqueName ( $ name ) { if ( ! isset ( $ this -> registry [ $ name ] ) ) { $ this -> registry [ $ name ] = 0 ; return $ name ; } ++ $ this -> registry [ $ name ] ; return sprintf ( '%s_%s' , $ name , $ this -> registry [ $ name ] ) ; }
Return an unique name for a variable.

@param string $name Name of the variable

@return string if not found return the $name given, if not return the name suffixed with a number
Return an unique name for a variable .