public function getName($autoGenerate = true)
    {
        if (!empty($this->_name)) {
            return $this->_name;
        }
        if ($autoGenerate) {
            $reflection = new \ReflectionClass($this);
            $this->_name = self::$autoNamePrefix . Inflector::variablize(
                    $reflection->getShortName()
                ) . self::$counter++;
        }
        return $this->_name;
    }
public function getName($autoGenerate = true)
    {
        if (!empty($this->_name)) {
            return $this->_name;
        }
        if ($autoGenerate) {
            $reflection = new \ReflectionClass($this);
            $this->_name = self::$autoNamePrefix . Inflector::variablize(
                    $reflection->getShortName()
                ) . self::$counter++;
        }
        return $this->_name;
    }
public function getName ( $ autoGenerate = true ) { if ( ! empty ( $ this -> _name ) ) { return $ this -> _name ; } if ( $ autoGenerate ) { $ reflection = new \ ReflectionClass ( $ this ) ; $ this -> _name = self :: $ autoNamePrefix . Inflector :: variablize ( $ reflection -> getShortName ( ) ) . self :: $ counter ++ ; } return $ this -> _name ; }
Returns the name of the object that is going to be used as a js variable of the renderer service.

@param bool $autoGenerate whether to auto-generate the name or not

@return string
Returns the name of the object that is going to be used as a js variable of the renderer service .