Returns the public type string for a given class name.

@param string $classIdentifier
@return string
@throws FormatNotSupportedException
438474
public function getType($classIdentifier)
    {
        if (array_key_exists($classIdentifier, $this->classIdentifierToTypeNameMap)) {
            return $this->classIdentifierToTypeNameMap[$classIdentifier];
        } else {
            throw new FormatNotSupportedException('There is no target type for class name "' . $classIdentifier . '"',
                1451995790);
        }
    }
721593
public function getFieldType($identifier)
    {
        if (!isset($this->fieldTypes[$identifier])) {
            throw new FieldTypeNotFoundException($identifier);
        }

        if ($this->fieldTypes[$identifier] instanceof SPIFieldType) {
            return $this->fieldTypes[$identifier];
        } elseif (is_callable($this->fieldTypes[$identifier])) {
            /** @var $closure \Closure */
            $closure = $this->fieldTypes[$identifier];
            $this->fieldTypes[$identifier] = $closure();
        }

        if (!$this->fieldTypes[$identifier] instanceof SPIFieldType) {
            throw new RuntimeException("\$fieldTypes[$identifier] must be instance of SPI\\FieldType\\FieldType or callable");
        }

        return $this->fieldTypes[$identifier];
    }
1255088
function classByIdentifier( $params )
    {
        $classIdentifier = $params['identifier'];

        $contentClass = eZContentClass::fetchByIdentifier( $classIdentifier );
        if( !is_object( $contentClass ) )
        {
            eZDebug::writeWarning( "Content class with identifier '$classIdentifier' doesn't exist.", __METHOD__ );
        }

        return $contentClass;
    }
531655
public function getMyType() {
        $className = get_class($this);
        $classParts = explode("\\", $className);
        $classSingle = $classParts[count($classParts) - 1];
        $classLowSingle = strtolower($classSingle);
        $type = str_replace("message", "", $classLowSingle);

        if (!$type) {
            return "unknown";
        } else {
            return $type;
        }
    }
598021
public function getIdentifier() : ?string 
    {
        if ( ! $this->hasIdentifier()) {
            $this->setIdentifier($this->getDefaultIdentifier());
        }
        return $this->identifier;
    }
810032
public function asObjectIdentifier(): Primitive\ObjectIdentifier
    {
        if (!$this->_element instanceof Primitive\ObjectIdentifier) {
            throw new \UnexpectedValueException(
                $this->_generateExceptionMessage(
                    Element::TYPE_OBJECT_IDENTIFIER));
        }
        return $this->_element;
    }
430251
public function findClass(AnServiceIdentifier $identifier)
    {
        $classname = 'An'.ucfirst($identifier->package).AnInflector::implode($identifier->path).ucfirst($identifier->name);

        if (!class_exists($classname)) {
            $classname = AnServiceClass::findDefaultClass($identifier);

            if (!$classname) {
                // use default class instead
                $classname = 'An'.ucfirst($identifier->package).AnInflector::implode($identifier->path).'Default';

                if (!class_exists($classname)) {
                    $classname = false;
                }
            }
        }

        return $classname;
    }
95170
private function classNameFromMetaKey($ident)
    {
        $key = $ident;

        if (isset(static::$camelCache[$key])) {
            return static::$camelCache[$key];
        }

        // Change "foo-bar" to "fooBar"
        $parts = explode('-', $ident);
        array_walk(
            $parts,
            function(&$i) {
                $i = ucfirst($i);
            }
        );
        $ident = implode('', $parts);

        // Change "/foo/bar" to "\Foo\Bar"
        $classname = str_replace('/', '\\', $ident);
        $parts     = explode('\\', $classname);

        array_walk(
            $parts,
            function(&$i) {
                $i = ucfirst($i);
            }
        );

        $classname = trim(implode('\\', $parts), '\\');

        static::$camelCache[$key]       = $classname;
        static::$snakeCache[$classname] = $key;

        return $classname;
    }
424211
public function escapeIdentifier(string $identifier): string
    {
        if ($identifier === '') {
            throw new \InvalidArgumentException('Identifier cannot be blank');
        }

        $escaper = function ($identifier) { return '`' . str_replace('`', '``', $identifier) . '`'; };
        $qualifiedIdentifiers = array_map($escaper, explode('.', $identifier));
        return implode('.', $qualifiedIdentifiers);
    }
26144
public static ValidationResult validateIdentifier(String identifier, IdentifierType type)
   {
      if (Strings.isNullOrEmpty(identifier))
         return new ValidationResult(ERROR, Messages.notNullOrEmpty(type));
      if (isReservedWord(identifier))
      {
         return new ValidationResult(ERROR, Messages.isAJavaKeyWord(identifier));
      }
      int javaLetter = identifier.codePointAt(0);
      if (!Character.isJavaIdentifierStart(javaLetter))
      {
         return new ValidationResult(ERROR, Messages.containsInvalidCharacters(identifier));
      }
      for (int ctr = 1; ctr < identifier.length(); ctr++)
      {
         int javaLetterOrDigit = identifier.codePointAt(ctr);
         if (!Character.isJavaIdentifierPart(javaLetterOrDigit))
         {
            return new ValidationResult(ERROR, Messages.containsInvalidCharacters(identifier));
         }
      }
      if (CLASS_NAME.equals(type) && identifier.contains("$"))
      {
         return new ValidationResult(WARNING, "The use of '$' in class names is discouraged.");
      }
      else
      {
         return new ValidationResult(INFO);
      }
   }
441953
private function getHostForImageIdentifier($imageIdentifier) {
        $dec = ord(substr($imageIdentifier, -1));

        // If this is an old image identifier (32 character hex string),
        // maintain backwards compatibility
        if (preg_match('#^[a-f0-9]{32}$#', $imageIdentifier)) {
            $dec = hexdec($imageIdentifier[0] . $imageIdentifier[1]);
        }

        return $this->serverUrls[$dec % count($this->serverUrls)];
    }
289606
public function parseIdentifier(ObjectIdentifier $identifier)
    {
        $info = parent::parseIdentifier($identifier);

        $path  = $identifier->path;

        //Allow locating default classes if $path is empty.
        if(empty($path))
        {
            $info['path']    = $info['file'];
            $info['file']    = '';
            $info['package'] = '';
        }
        else
        {
            $package = array_shift($path);

            $info['path']    = StringInflector::implode($path);
            $info['package'] = ucfirst($package);
        }

        //Make an exception for 'view' and 'module' types
        if(in_array($info['package'], array('View','Module')) && !in_array('behavior', $path)) {
            $info['path'] = '';
        }

        return $info;
    }
1049377
public function getProxy($className, $identifier)
    {
        $proxyClassName = str_replace('\\', '', $className) . 'Proxy';
        $fqn = $this->proxyNamespace . '\\' . $proxyClassName;

        if (! class_exists($fqn, false)) {
            $fileName = $this->proxyDir . DIRECTORY_SEPARATOR . $proxyClassName . '.php';
            if ($this->autoGenerate) {
                $this->generateProxyClass($this->xem->getClassMetadata($className), $proxyClassName, $fileName, self::$proxyClassTemplate);
            }
            require $fileName;
        }

        if ( ! $this->xem->getMetadataFactory()->hasMetadataFor($fqn)) {
            $this->xem->getMetadataFactory()->setMetadataFor($fqn, $this->xem->getClassMetadata($className));
        }

        $documentPersister = $this->xem->getUnitOfWork()->getXmlEntityPersister($className);

        return new $fqn($documentPersister, $identifier);
    }
1132868
public function getFldTypeForClass()
    {
        $type = 'TYPE_STRING';
        switch ($this->getFldType()) {
            case FFCST::TYPE_INTEGER:
                $type = 'TYPE_INTEGER';
                break;
            case FFCST::TYPE_BIGINT:
                $type = 'TYPE_BIGINT';
                break;
            case FFCST::TYPE_DATETIME:
                $type = 'TYPE_DATETIME';
                break;
            case FFCST::TYPE_MD5:
                $type = 'TYPE_MD5';
                break;
            case FFCST::TYPE_STRING:
                $type = 'TYPE_STRING';
                break;
            case FFCST::TYPE_BOOLEAN:
                $type = 'TYPE_BOOLEAN';
                break;
            case FFCST::TYPE_BLOB:
                $type = 'TYPE_BLOB';
                break;
        }
        return $type;
    }
379758
public function getIdentifier() {

		if(false === isset($this -> identifier)) {

			$cl = new \ReflectionClass($this);
			return trigger_error(sprintf('No table identifier specified in "%s" class', $cl -> getFileName()), E_USER_ERROR);
		}

		return $this -> identifier;
	}
924325
@Override
    public String getClassLoaderIdentifier(ClassLoader classloader) throws IllegalArgumentException {
        // Disable for bundles, because the bundle id can change across instances of the server,
        // meaning the identifier would not be reliable
        if (classloader instanceof ThreadContextClassLoader && !(classloader instanceof ThreadContextClassLoaderForBundles)) {
            return ((ThreadContextClassLoader) classloader).getKey();
        } else {
            return null;
        }
    }
1140727
protected function namespaceClassName(string $classCandidate, array $namespacesToTry = [], callable $determineMatch = null): string
    {
        // Always try the explicitly set namespace first
        array_unshift(
            $namespacesToTry,
            ASTHelper::getNamespaceForDirective(
                $this->definitionNode,
                static::name()
            )
        );

        if (! $determineMatch) {
            $determineMatch = 'class_exists';
        }

        $className = Utils::namespaceClassname(
            $classCandidate,
            $namespacesToTry,
            $determineMatch
        );

        if (! $className) {
            throw new DirectiveException(
                "No class '{$classCandidate}' was found for directive '{$this->name()}'"
            );
        }

        return $className;
    }