Create a new identifier for the symbol at runtime. All characters
are allowed except digits and '.'.

@param string $identifier
@return void
@throws InvalidIdentifierException
769146
public function addIdentifier($identifier)
    {
        $this->validateIdentifier($identifier);

        if (in_array($identifier, $this->identifiers)) {
            throw new InvalidIdentifierException('Error: Cannot add the identifier "'.$identifier.'" twice');
        }

        $this->identifiers[] = $identifier;
    }
1102050
public function set($identifier, $data = null)
    {
        if($data == null) {
            $data = is_string($identifier) ? new KObjectIdentifier($identifier) : $identifier;
        }

        $this->offsetSet((string) $identifier, $data);
        return $data;
    }
488848
public function normalizeIdentifier($identifier)
    {
        foreach ($this->plugins as $id => $object) {
            if (strtolower($id) == strtolower($identifier)) {
                return $id;
            }
        }

        return $identifier;
    }
576688
protected function quoteIdentifier($identifier)
    {
        if (is_array($identifier)) {
            $result = array_map([$this, 'quoteOneIdentifier'], $identifier);

            return implode(', ', $result);
        }

        return Inflector::tabilize($this->quoteOneIdentifier(lcfirst($identifier)));
    }
1210760
public function setIdentifier($identifier)
    {
        if (Format::isIdentifier($identifier, false) === true) {
            $this->identifier = $identifier;
        } else {
            $msg = "The 'identifier' argument must be a valid QTI identifier, '" . $identifier . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
1051236
protected static function _identifier(AnServiceIdentifier $identifier)
    {
        $identifier = clone $identifier;

        if (!$identifier->name) {
            $identifier->name = AnInflector::singularize($identifier->package);
        }

        $identifier->type = 'com';
        $identifier->path = array('domain','entity');

        return $identifier;
    }
545141
public function isValidEntryIdentifier($identifier)
    {
        if (false === GeneralUtility::isValidUrl($identifier)) {
            return false;
        }
        $urlParts = \parse_url($identifier);
        $required = ['host', 'path', 'scheme'];
        foreach ($required as $item) {
            if (!isset($urlParts[$item]) || \mb_strlen($urlParts[$item]) <= 0) {
                return false;
            }
        }

        return true;
    }
1037986
public function hasIdentifier($identifier)
    {
        if(!$identifier instanceof ObjectIdentifierInterface) {
            $identifier = $this->getIdentifier($identifier);
        }

        return in_array((string) $identifier, $this->__identifier_list);
    }
426113
public function setBuild(array $identifiers)
    {
        foreach ($identifiers as $identifier) {
            if (!Validator::isIdentifier($identifier)) {
                throw new InvalidIdentifierException($identifier);
            }
        }

        $this->build = $identifiers;

        return $this;
    }
962793
protected static function _parseIdentifier($identifier)
    {
        $parts = array();
        $hash  = $identifier;

        // Validate the variable format
        if (strpos($identifier, '.') !== false) {
            // Split the variable name into it's parts
            $parts = explode('.', $identifier);

            // Validate the hash name
            $hash   = array_shift($parts);
        }

        $hash = strtoupper($hash);

        return array($hash, $parts);
    }
330150
public function assignIdentifier($object, array $identifier) : void
    {
        if (! $object instanceof IdentifiableInterface) {
            throw new InvalidArgumentException(sprintf('%s must implement IdentifiableInterface.', get_class($object)));
        }

        $object->assignIdentifier($identifier);
    }
766440
public function setIdentifier(string $identifier): void
	{
		if(!in_array($identifier, ['email', 'username', 'id']))
		{
			throw new InvalidArgumentException(vsprintf('Invalid identifier [ %s ].', [$identifier]));
		}

		$this->identifier = $identifier;
	}
999468
protected static function getRatingByStringIdentifier(string $identifier): int
    {
        switch ($identifier) {
            case 's':
                return PostInterface::RATING_SAFE;

            case 'q':
                return PostInterface::RATING_QUESTIONABLE;

            case 'e':
                return PostInterface::RATING_EXPLICIT;

            default:
                throw new InvalidArgumentException('Unknown rating identifier');
        }
    }
253805
public function setOutcomeIdentifier($outcomeIdentifier)
    {
        if (Format::isIdentifier($outcomeIdentifier)) {
            $this->outcomeIdentifier = $outcomeIdentifier;
        } else {
            $msg = "'${outcomeIdentifier}' is not a valid QTI Identifier.";
            throw new InvalidArgumentException($msg);
        }
    }
1183016
public function set_identifiers(array $identifiers = array()) {
        if ($this->identifiers !== null) {
            throw new coding_exception("You can only set identifiers on initial definition creation." .
                " Define a new cache to set different identifiers.");
        }
        if (!empty($identifiers) && !empty($this->invalidationevents)) {
            throw new coding_exception("You cannot use event invalidation and identifiers at the same time.");
        }

        foreach ($this->requireidentifiers as $identifier) {
            if (!isset($identifiers[$identifier])) {
                throw new coding_exception('Identifier required for cache has not been provided: '.$identifier);
            }
        }

        $this->identifiers = array();

        foreach ($identifiers as $name => $value) {
            $this->identifiers[$name] = (string)$value;
        }
        // Reset the key prefix's they need updating now.
        $this->keyprefixsingle = null;
        $this->keyprefixmulti = null;

        return true;
    }
814761
public function quoteIdent( $identifier )
    {

        // a identifier can be composite - separated by dots
        $fragments = explode('.',$identifier);
        foreach( $fragments as &$fragment ) {
            $fragment = sprintf(
                '"%s"',
                str_replace( '"', '""', $fragment )
            );
        }

        return implode('.',$fragments);

    }
357607
private function decompose($identifier)
	{
		$identifier = base64_decode($identifier);

		if (strstr($identifier, ':'))
		{
			list($token, $path) = explode(':', $identifier, 2);

			$this->token = $token;
			$this->path  = $path;
		}
	}