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
433439
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;
    }
230361
public static function getInstance($AutoCreate = false)
    {
        if ($AutoCreate===true && !self::$instance) {
            self::init();
        }
        return self::$instance;
    }
1056479
public function getIdentifier($generate = true){
        if(empty($this->identifier) && $generate){
            //try generating an identifier
            $relatedItem = $this->getRelatedItem();
            if(!is_null($relatedItem)){
                $this->identifier = $this->generateIdentifier();
            }
        }
        return (string) $this->identifier;
    }
544802
public static function getNameByConstant($constant)
    {
        switch ($constant) {
            case self::DEF:
                return 'default';
            break;

            case self::RECT:
                return 'rect';
            break;

            case self::CIRCLE:
                return 'circle';
            break;

            case self::POLY:
                return 'poly';
            break;

            case self::ELLIPSE:
                return 'ellipse';
            break;

            default:
                return false;
            break;
        }
    }
531652
private function getControllerName($listener) : string
    {
        if (is_array($listener)) {
            if (is_string($listener[0])) {
                return $listener[0] . '::' . $listener[1];
            } else {
                return get_class($listener[0]) . '::' . $listener[1];
            }
        } elseif (is_string($listener)) {
            return $listener;
        } else {
            $reflection = new \ReflectionFunction($listener);

            return $reflection->getClosureScopeClass()->getName() . '::' .
                'closure[' . $reflection->getStartLine() . ':' .
                $reflection->getEndLine() . ']';
        }
    }
656056
public function getName() {
		if ($this->_name === null) {
			$name = get_class($this);
			$pos = strrpos($name, '\\');
			if ($pos !== false) {
				$name = substr($name, $pos + 1);
			}
			if (preg_match('/^Twig([A-Za-z]+)Extension$/', $name, $matches)) {
				$name = $matches[1];
			}
			$this->_name = strtolower(preg_replace('/([a-z])([A-Z])/', '$1_$2', $name));
		}
		return $this->_name;
	}
1341208
public function get_instance_name($instance) {
        global $DB;

        if (empty($instance->name)) {
            if (!empty($instance->roleid) and $role = $DB->get_record('role', array('id'=>$instance->roleid))) {
                $role = ' (' . role_get_name($role, context_course::instance($instance->courseid, IGNORE_MISSING)) . ')';
            } else {
                $role = '';
            }
            $enrol = $this->get_name();
            return get_string('pluginname', 'enrol_'.$enrol) . $role;
        } else {
            return format_string($instance->name);
        }
    }
796634
function get_plugin_name( $premium_suffix = false ) {
            $this->_logger->entrance();

            /**
             * This `if-else` can be squeezed into a single `if` but I intentionally split it for code readability.
             *
             * @author Vova Feldman
             */
            if ( ! isset( $this->_plugin_name ) ) {
                // Name is not yet set.
                $this->set_name( $premium_suffix );
            } else if (
                ! empty( $premium_suffix ) &&
                ( ! is_object( $this->_plugin ) || $this->_plugin->premium_suffix !== $premium_suffix )
            ) {
                // Name is already set, but there's a change in the premium suffix.
                $this->set_name( $premium_suffix );
            }

            return $this->_plugin_name;
        }
93551
protected function getPrefix($object)
    {
        $id = 'user';

        if (method_exists($object, 'getOrganization')) {
            $org = $object->getOrganization();

            if ($org instanceof OrganizationInterface) {
                $id = (string) $org->getId();
            }
        }

        return $id.'__';
    }
332460
public function render(Autocomplete $autocomplete)
    {
        $formatter = $this->getFormatter();
        $jsonBuilder = $this->getJsonBuilder();

        if ($autocomplete->hasTypes()) {
            $jsonBuilder->setValue('[types]', $autocomplete->getTypes());
        }

        if ($autocomplete->hasBound()) {
            $jsonBuilder->setValue('[bounds]', $autocomplete->getBound()->getVariable(), false);
        }

        if ($autocomplete->hasComponents()) {
            $jsonBuilder->setValue('[componentRestrictions]', $autocomplete->getComponents());
        }

        if (!$jsonBuilder->hasValues()) {
            $jsonBuilder->setJsonEncodeOptions(JSON_FORCE_OBJECT);
        }

        return $formatter->renderObjectAssignment($autocomplete, $formatter->renderObject('Autocomplete', [
            $formatter->renderCall($formatter->renderProperty('document', 'getElementById'), [
                $formatter->renderEscape($autocomplete->getHtmlId()),
            ]),
            $jsonBuilder->build(),
        ], $formatter->renderClass('places')));
    }
80104
function imageNameByNode( $contentObjectAttribute, $mainNode, $language = false )
    {
        if ( $language === false )
        {
            if ( is_object( $contentObjectAttribute ) ) // for backward compatibility when eZImageAliasHandler used $this->contentObjectAttribute
            {
                $language = $contentObjectAttribute->attribute( 'language_code' );
            }
            else
            {
                $language = $contentObjectAttribute['language_code'];
            }
        }
        $objectName = $mainNode->getName( $language );
        if ( !$objectName )
        {
            $objectName = $this->attribute( 'alternative_text' );
            if ( !$objectName )
            {
                $objectName = ezpI18n::tr( 'kernel/classes/datatypes', 'image', 'Default image name' );
            }
        }
        $objectName = eZImageAliasHandler::normalizeImageName( $objectName );
        return $this->trimToFileSystemFileName( $objectName );
    }
1055207
public function getName($default = false)
    {
        if (!($name = $this->getDispositionParameter('filename')) &&
            !($name = $this->getContentTypeParameter('name')) &&
            $default) {
            $name = preg_replace('|\W|', '_', $this->getDescription(false));
        }

        return $name;
    }
1332555
public function getName($backwards = 2)
    {
        if (!$this->name) {
            if ($this->config['name']) {
                return $this->name = $this->config['name'];
            }

            $class = static::class;

            // If we are using this class as default view, return default name.
            if ($class === HtmlView::class) {
                return $this->name = 'default';
            }

            $this->name = MvcHelper::guessName(static::class, $backwards);
        }

        return $this->name;
    }
509729
public function getObjectBase(string $objectName, bool $endOnly = true): string
    {
        $tmp = explode('\\', $objectName);
        $end = array_pop($tmp);

        if ($endOnly) {
            return $end;
        }

        // eg: froq\app\library\entity\UserEntity => app/library/entity/UserEntity
        $path = join('\\', array_slice($tmp, 3));

        return $path .'\\'. $end;
    }
986912
public function getName($blnPlain = false)
    {
        $strReturn = "";

        if ($blnPlain) {
            $strReturn = $this->__name;
        } else {
            switch ($this->__type) {
                case ValidForm::VFORM_RADIO_LIST:
                    $strReturn = $this->__name;

                    break;
                case ValidForm::VFORM_CHECK_LIST:
                    $strReturn = (strpos($this->__name, "[]") === false) ? $this->__name . "[]" : $this->__name;

                    break;
            }
        }

        return $strReturn;
    }
972139
protected function getFullEntityName () : string
    {
        $entityClass = $this->classNameTransformer->transformModelToEntity(static::class);

        if (!\class_exists($entityClass))
        {
            throw new AutoConfigurationFailedException(\sprintf(
                "Cannot automatically generate entity name for model '%s', guessed '%s'.",
                static::class,
                $entityClass
            ));
        }

        return $entityClass;
    }
873356
function getPropName (prop) {
    let res
    if (testEl.style[prop] !== undefined) {
      res = prop
    } else {
      for (let key in vendors) {
        let val = '-' + vendors[key] + '-'
        if (testEl.style[val + prop] !== undefined) {
          res = val + prop
          break
        }
      }
    }

    return res
  }