Splits an identifier string of the form PackageKey:id or PackageKey:Source:id into an array with the keys
id, source and packageKey.

@param string $id translation id with possible package and source parts
@return array
326584
protected function splitIdentifier($id)
    {
        $packageKey = 'Neos.Neos';
        $source = 'Main';
        $idParts = explode(':', $id, 3);
        switch (count($idParts)) {
            case 2:
                $packageKey = $idParts[0];
                $id = $idParts[1];
                break;
            case 3:
                $packageKey = $idParts[0];
                $source = str_replace('.', '/', $idParts[1]);
                $id = $idParts[2];
                break;
        }
        return [
            'id' => $id,
            'source' => $source,
            'packageKey' => $packageKey
        ];
    }
490481
public function id($id)
    {
        $parts = array_merge(array($this->namespace), func_get_args());
        return trim(implode(self::$namespaceSeparator, $parts), self::$namespaceSeparator);
    }
1237871
public function getTranslations($id, $parameters = [])
    {
        $messages = [];

        foreach ($this->supportedLocales as $locale) {
            $message = $this->getTranslation($id, $parameters, $locale);
            $messages[] = [
                "Lang" => lcfirst($locale),
                "Text" => $message,
            ];
        }

        return $messages;
    }
109671
public function offsetGet($id)
    {
        if (!array_key_exists($id, $this->strings)) {
            throw new InvalidArgumentException($id . ' is not defined');
        }

        return $this->strings[$id];
    }
1333159
public function getRecipeById($id)
    {
        $result = [
            'className' => (isset($this->classNameById[$id])) ?
                $this->classNameById[$id] :
                null,
            'arguments' => (isset($this->argumentsById[$id])) ?
                $this->argumentsById[$id] :
                null,
            'constructor' => (isset($this->constructorById[$id])) ?
                $this->constructorById[$id] :
                null,
            'dependencies' => (isset($this->dependenciesById[$id])) ?
                $this->dependenciesById[$id] :
                null,
        ];

        return $result;
    }
427265
public function getLanguageID($id)
	{
		// normalize id
		$id = $this->getCanonicalID($id);
		// remove sub tags
		if(($underscorePosition=strpos($id, '_'))!== false)
		{
			$id = substr($id, 0, $underscorePosition);
		}
		return $id;
	}
1036189
public function getText(string $id): ?string
    {
        $getText = function(string $id, string $locale) {
            if (isset($this->defaultLocales[$locale]) && $this->defaultLocales[$locale] === 0) {
                $app = App::get();
                $context = $app->contexts->get(__FILE__);
                $this->defaultLocales[$locale] = 1;
                $filename = $context->dir . '/locales/' . $locale . '.php';
                if (is_file($filename)) {
                    $data = include $filename;
                    if (is_array($data)) {
                        $this->addDictionary($locale, $data);
                    }
                }
            }
            if (isset($this->dictionaries[$locale])) {
                foreach ($this->dictionaries[$locale] as $i => $dictionary) {
                    if (is_callable($dictionary)) {
                        $dictionary = call_user_func($dictionary);
                        $this->dictionaries[$locale][$i] = $dictionary;
                    }
                    if (is_array($dictionary)) {
                        foreach ($dictionary as $_id => $text) {
                            if ($id === $_id) {
                                return (string) $text;
                            }
                        }
                    }
                }
            }
            return null;
        };
        $text = $getText($id, $this->locale);
        if ($text === null || !isset($text[0])) {
            $text = $getText($id, $this->backupLocale);
        }
        return $text;
    }
1027515
public function normalizeId($id)
    {
        if (!\is_string($id)) {
            $id = (string) $id;
        }
        if (isset($this->normalizedIds[$normalizedId = strtolower($id)])) {
            $normalizedId = $this->normalizedIds[$normalizedId];
            if ($id !== $normalizedId) {
                @trigger_error(sprintf('Service identifiers will be made case sensitive in Symfony 4.0. Using "%s" instead of "%s" is deprecated since Symfony 3.3.', $id, $normalizedId), E_USER_DEPRECATED);
            }
        } else {
            $normalizedId = $this->normalizedIds[$normalizedId] = $id;
        }

        return $normalizedId;
    }
669921
protected function getGroupName(/*# string */ $id)/*# : string */
    {
        return explode(
            $this->config->getDelimiter(),
            ltrim($id, $this->config->getDelimiter())
        )[0];
    }
742613
protected function wrap($id)
    {
        return join('.', array_map(function ($id) {
            return static::QUOTE_CHAR . $id . static::QUOTE_CHAR;
        }, explode('.', $id, 3)));
    }
915027
public static function getById($id)
    {
        $result = null;
        $info = CldrData::getLanguageInfo($id);
        if (isset($info)) {
            $result = new Language($info);
        }

        return $result;
    }
503845
IdComponents splitId(String id) throws IndexOutOfBoundsException
   {
      String[] membershipIDs = id.split(",");

      String groupNodeId = membershipIDs[0];
      String userName = membershipIDs[1];
      String type = membershipIDs[2];

      return new IdComponents(groupNodeId, userName, type);
   }
791364
private function getDirectoryStructure($id)
    {
        // our base string is the last 4 digits, defaulting to 0, reversed
        $idString = strrev(
            substr(str_pad($id, 4, 0, STR_PAD_LEFT), -4)
        );

        return trim(
            chunk_split($idString, 1, '/'),
            '/'
        );
    }
1285841
protected function getJunctionKeys($id): array
	{
		$ids = [];

		foreach((is_array($id) ? $id : [$id]) as $value)
		{
			if($value instanceof $this->model)
			{
				$value = $value->getPrimaryKeyValue();
			}

			$ids[] = $value;
		}

		return $ids;
	}
469541
public function get($id)
    {
        if (!is_string($id)) {
            throw new ContainerException('$id must be a string');
        }

        if (!isset($this->definitions[$id])) {
            throw new NotFoundException("Unresolvable ".$id);
        }

        return $this->definitions[$id];
    }
661366
public function getFullHostById($id)
    {
        foreach ($this->hosts as $host => $parameters) {
            if (!isset($parameters['id']) || $parameters['id'] !== $id) {
                continue;
            }

            return $parameters;
        }

        return null;
    }
1040941
protected function get($id)
    {
        foreach ($this as $country) {
            if (0 === strcasecmp($id, $country[self::KEY_ALPHA2]) ||
                0 === strcasecmp($id, $country[self::KEY_ALPHA3]) ||
                0 === strcasecmp($id, $country[self::KEY_NUMERIC])
            ) {
                return $country;
            }
        }

        throw new \OutOfBoundsException('ISO 3166-1 does not contain: '.$id);
    }