Neos\Neos\Aspects\NodeTypeConfigurationEnrichmentAspect::splitIdentifier PHP Метод

splitIdentifier() защищенный Метод

Splits an identifier string of the form PackageKey:id or PackageKey:Source:id into an array with the keys id, source and packageKey.
protected splitIdentifier ( string $id ) : array
$id string translation id with possible package and source parts
Результат array
    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];
    }